From c2b7544979b16e1f27f419475b866a2903bd9c0a Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 26 Dec 2025 20:22:04 +1100 Subject: [PATCH] add func for creating texture without data --- vulkan.d | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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) {