From f96d30ae9ce76a95c46c48f01df4e9cb9520a1f2 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 23 Nov 2025 14:41:22 +1100 Subject: [PATCH] undo descriptor count change --- vulkan.d | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/vulkan.d b/vulkan.d index 605da38..7a2bb9d 100644 --- a/vulkan.d +++ b/vulkan.d @@ -233,7 +233,6 @@ struct Descriptor { DescType type; u32 binding; - u32 count; union { Buffer buf; @@ -565,11 +564,10 @@ CreatePipelineLayout(T)(Vulkan* vk, T layouts, u32 push_const_size, bool compute } void -CreateBuffer(Vulkan* vk, Descriptor* desc, BufferType type, u64 size, bool host_visible, DescType desc_type, u32 binding, u32 count = 1) +CreateBuffer(Vulkan* vk, Descriptor* desc, BufferType type, u64 size, bool host_visible, DescType desc_type, u32 binding) { desc.type = desc_type; desc.binding = binding; - desc.count = count; CreateBuffer(vk, &desc.buf, type, size, host_visible); } @@ -963,7 +961,6 @@ CreateImageView(Vulkan* vk, Descriptor* view, u32 w, u32 h, u32 ch, u8[] data, D ImageDescCheck(type); view.type = type; view.binding = binding; - view.count = 1; CreateImageView(vk, &view.view, w, h, ch, data); } @@ -1036,7 +1033,6 @@ CreateImageView(Vulkan* vk, Descriptor* desc, u32 w, u32 h, Format format, Image ImageDescCheck(type); desc.type = type; desc.binding = binding; - desc.count = 1; CreateImageView(vk, &desc.view, w, h, format, usage); } @@ -1170,7 +1166,6 @@ CreateBufferView(Vulkan* vk, Descriptor* desc, u64 size, Format format, DescType VkCheckA("CreateBufferView failure: vkCreateBufferView failed", result); desc.binding = binding; - desc.count = 1; desc.buf_view.size = size; } @@ -1985,7 +1980,7 @@ PrepareWrite(Vulkan* vk, VkWriteDescriptorSet* write, DescSet set, Descriptor* d write.descriptorType = desc.type; write.dstSet = set.handle; write.dstBinding = desc.binding; - write.descriptorCount = desc.count; + write.descriptorCount = 1; switch(desc.type) with(DescType) {