add elem index to createimageview

This commit is contained in:
Matthew 2025-12-26 18:58:40 +11:00
parent e412227cfc
commit ec98ea6f5b

View File

@ -971,6 +971,14 @@ WaitForTransfers(Vulkan* vk)
vkWaitForFences(vk.device, 1, &vk.imm_fence, VK_TRUE, u64.max); 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 void
CreateImageView(Vulkan* vk, Descriptor* view, u32 w, u32 h, u32 ch, u8[] data, DescType type = DT.Image, u32 binding) 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 void
CreateImageView(Vulkan* vk, Descriptor* desc, u32 w, u32 h, Format format, ImageUsage usage, DescType type, u32 binding) CreateImageView(Vulkan* vk, Descriptor* desc, u32 w, u32 h, Format format, ImageUsage usage, DescType type, u32 binding)
{ {