diff --git a/vulkan.d b/vulkan.d index 57086b5..7d970ee 100644 --- a/vulkan.d +++ b/vulkan.d @@ -988,6 +988,23 @@ CreateImageView(Vulkan* vk, Descriptor* view, u32 w, u32 h, u32 ch, u8[] data, D CreateImageView(vk, &view.view, w, h, ch, data); } +void +CreateImageViewTex(Vulkan* vk, Descriptor* desc, u32 w, u32 h, DescType type = DT.Image, u32 binding, u32 index) +{ + desc.array_elem = true; + desc.index = index; + CreateImageViewTex(vk, desc, w, h, type, binding); +} + +void +CreateImageViewTex(Vulkan* vk, Descriptor* desc, u32 w, u32 h, DescType type = DT.Image, u32 binding) +{ + ImageDescCheck(type); + desc.type = type; + desc.binding = binding; + CreateImageView(vk, &desc.view, w, h, FMT.RGBA_UNORM, IU.Texture); +} + pragma(inline): void CreateImageView(Vulkan* vk, ImageView* view, u32 w, u32 h, u32 ch, u8[] data) {