add array index to descriptor struct
This commit is contained in:
parent
11cf96b799
commit
e412227cfc
11
vulkan.d
11
vulkan.d
@ -232,8 +232,6 @@ struct Buffer
|
||||
|
||||
struct Descriptor
|
||||
{
|
||||
DescType type;
|
||||
u32 binding;
|
||||
union
|
||||
{
|
||||
Buffer buf;
|
||||
@ -242,6 +240,10 @@ struct Descriptor
|
||||
BufferView buf_view;
|
||||
VkSampler sampler;
|
||||
}
|
||||
DescType type;
|
||||
u32 binding;
|
||||
u32 index;
|
||||
bool array_elem;
|
||||
}
|
||||
|
||||
enum MipmapMode : VkSamplerMipmapMode
|
||||
@ -2021,6 +2023,11 @@ PrepareWrite(Vulkan* vk, VkWriteDescriptorSet* write, DescSet set, Descriptor* d
|
||||
write.dstBinding = desc.binding;
|
||||
write.descriptorCount = 1;
|
||||
|
||||
if(desc.array_elem)
|
||||
{
|
||||
write.dstArrayElement = desc.index;
|
||||
}
|
||||
|
||||
switch(desc.type) with(DescType)
|
||||
{
|
||||
case Image, StorageImage, InputAttach:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user