From ec98ea6f5bae22a1331edc4d71fa0b2991a4d1e8 Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 26 Dec 2025 18:58:40 +1100 Subject: [PATCH] add elem index to createimageview --- vulkan.d | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/vulkan.d b/vulkan.d index 8524e2b..57086b5 100644 --- a/vulkan.d +++ b/vulkan.d @@ -971,6 +971,14 @@ WaitForTransfers(Vulkan* vk) vkWaitForFences(vk.device, 1, &vk.imm_fence, VK_TRUE, u64.max); } +void +CreateImageView(Vulkan* vk, Descriptor* view, u32 w, u32 h, u32 ch, u8[] data, DescType type = DT.Image, u32 binding, u32 index) +{ + view.array_elem = true; + view.index = index; + CreateImageView(vk, view, w, h, ch, data, type, binding); +} + void CreateImageView(Vulkan* vk, Descriptor* view, u32 w, u32 h, u32 ch, u8[] data, DescType type = DT.Image, u32 binding) { @@ -1043,6 +1051,15 @@ CreateImageView(Vulkan* vk, ImageView* view, u32 w, u32 h, u32 ch, u8[] data) } } + +void +CreateImageView(Vulkan* vk, Descriptor* desc, u32 w, u32 h, Format format, ImageUsage usage, DescType type, u32 binding, u32 index) +{ + desc.array_elem = true; + desc.index = index; + CreateImageView(vk, desc, w, h, format, usage, type, binding); +} + void CreateImageView(Vulkan* vk, Descriptor* desc, u32 w, u32 h, Format format, ImageUsage usage, DescType type, u32 binding) {