diff --git a/vulkan.d b/vulkan.d index 536a1a7..05f7a92 100644 --- a/vulkan.d +++ b/vulkan.d @@ -770,7 +770,7 @@ BeginRendering(Vulkan* vk) vkCmdBeginRenderPass(vk.cmds[vk.frame_index], &pass_info, VK_SUBPASS_CONTENTS_INLINE); } -pragma(inline): u32[2] +u32[2] GetExtent(Vulkan* vk) { u32[2] extent; @@ -779,7 +779,7 @@ GetExtent(Vulkan* vk) return extent; } -pragma(inline): f32 +f32 GetAspect(Vulkan* vk) { return cast(f32)(vk.swapchain_extent.width) / cast(f32)(vk.swapchain_extent.height); @@ -1033,7 +1033,7 @@ CreateImageViewTex(Vulkan* vk, Descriptor* desc, u32 w, u32 h, DescType type = D CreateImageView(vk, &desc.view, w, h, FMT.RGBA_UNORM, IU.Texture); } -pragma(inline): void +void CreateImageView(Vulkan* vk, ImageView* view, u32 w, u32 h, u32 ch, u8[] data) { CreateImageView(vk, view, w, h, FMT.RGBA_UNORM, IU.Texture); @@ -1114,7 +1114,7 @@ CreateImageView(Vulkan* vk, Descriptor* desc, u32 w, u32 h, Format format, Image CreateImageView(vk, &desc.view, w, h, format, usage); } -pragma(inline): void +void CreateImageView(Vulkan* vk, ImageView* view, u32 w, u32 h, Format format, ImageUsage usage) { VmaAllocationCreateInfo alloc_info = { @@ -1185,7 +1185,7 @@ CreateImageView(Vulkan* vk, ImageView* view, u32 w, u32 h, Format format, ImageU else assert(false, "Unimplemented usage"); } -pragma(inline): void +void BeginComputePass(Vulkan* vk) { VkResult result = vkWaitForFences(vk.device, 1, &vk.comp_fence, VK_TRUE, 1000000000); @@ -1207,7 +1207,7 @@ BeginComputePass(Vulkan* vk) VkCheckA("BeginComputePass failure: vkBeginCommandBuffer error", result); } -pragma(inline): void +void FinishComputePass(Vulkan* vk) { VkResult result = vkEndCommandBuffer(vk.comp_cmd); @@ -1228,7 +1228,7 @@ FinishComputePass(Vulkan* vk) VkCheckA("FinishComputePass failure: vkQueueSubmit2 error", result); } -pragma(inline): void +void CreateBufferView(Vulkan* vk, Descriptor* desc, u64 size, Format format, DescType type, u32 binding) { CreateBuffer(vk, &desc.buf_view.base, BT.BufferView, size, false); @@ -1375,7 +1375,7 @@ TransferReady(Vulkan* vk) return VkCheck("Transfer failure: vkWaitForFences error", result); } -pragma(inline): bool +bool Transfer(Vulkan* vk, ImageView* view, u8[] data, u32 w, u32 h) { return Transfer(vk, &view.base, data, w, h); @@ -1429,19 +1429,19 @@ Transfer(Vulkan* vk, Image* image, u8[] data, u32 w, u32 h) return success; } -pragma(inline): void +void Copy(VkCommandBuffer cmd, Image* src, Image* dst, VkExtent2D src_ext, VkExtent2D dst_ext) { Copy(cmd, src.image, dst.image, src.layout, dst.layout, src_ext, dst_ext); } -pragma(inline): void +void Copy(VkCommandBuffer cmd, Image* src, VkImage dst, VkImageLayout dst_layout, VkExtent2D src_ext, VkExtent2D dst_ext) { Copy(cmd, src.image, dst, src.layout, dst_layout, src_ext, dst_ext); } -pragma(inline): void +void Copy(VkCommandBuffer cmd, VkImage src, VkImage dst, VkImageLayout src_layout, VkImageLayout dst_layout, VkExtent2D src_ext, VkExtent2D dst_ext) { VkImageBlit blit = { @@ -1591,7 +1591,7 @@ SetExtent(Vulkan* vk, u32 x, u32 y) vk.res = [x, y]; } -pragma(inline): void +void BindPipeline(Vulkan* vk, VkCommandBuffer cmd, PipelineHandles* pipeline) { vkCmdBindPipeline(cmd, pipeline.type, pipeline.handle); @@ -1636,7 +1636,7 @@ ResetScissor(Vulkan* vk, VkCommandBuffer cmd = cast(VkCommandBuffer)VK_NULL_HAND } -pragma(inline): void +void Transition(VkCommandBuffer cmd, VkImage image, VkImageLayout current_layout, VkImageLayout new_layout) { VkImageMemoryBarrier2 barrier = { @@ -1695,14 +1695,14 @@ Transition(VkCommandBuffer cmd, Descriptor* desc, VkImageLayout new_layout) Transition(cmd, &desc.view, new_layout); } -pragma(inline): void +void Transition(VkCommandBuffer cmd, ImageView* view, VkImageLayout new_layout) { Transition(cmd, view.image, view.layout, new_layout); view.layout = new_layout; } -pragma(inline): void +void Transition(VkCommandBuffer cmd, Image* image, VkImageLayout new_layout) { Transition(cmd, image.image, image.layout, new_layout); @@ -2194,7 +2194,7 @@ WriteConvDescriptor(Vulkan* vk, ImageView* view) vkUpdateDescriptorSets(vk.device, 1, &write, 0, null); } -pragma(inline): void +void Dispatch(Vulkan* vk, VkCommandBuffer cmd) { f32 w = Ceil(cast(f32)(vk.swapchain_extent.width) / 16.0F); @@ -2202,7 +2202,7 @@ Dispatch(Vulkan* vk, VkCommandBuffer cmd) vkCmdDispatch(cmd, cast(u32)w, cast(u32)h, 1); } -pragma(inline): void +void Dispatch(Vulkan* vk) { Dispatch(vk, vk.cmds[vk.frame_index]); diff --git a/vulkan_util.d b/vulkan_util.d index bc7e028..4672c94 100644 --- a/vulkan_util.d +++ b/vulkan_util.d @@ -136,7 +136,7 @@ struct SLList(T) Node!(T)* last; } -pragma(inline): void +void Push(T)(SLList!(T)*list, Node!(T)* node, Node!(T)* nil) { if(CheckNil(nil, list.first)) @@ -152,7 +152,7 @@ Push(T)(SLList!(T)*list, Node!(T)* node, Node!(T)* nil) } } -pragma(inline): void +void PushFront(T)(SLList!(T)*list, Node!(T)* node, Node!(T)* nil) { if(CheckNil(nil, list.first)) @@ -167,7 +167,7 @@ PushFront(T)(SLList!(T)*list, Node!(T)* node, Node!(T)* nil) } } -pragma(inline): bool +bool CheckNil(T)(Node!(T)* nil, Node!(T)* node) { return node == null || node == nil;