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
|
struct Descriptor
|
||||||
{
|
{
|
||||||
DescType type;
|
|
||||||
u32 binding;
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
Buffer buf;
|
Buffer buf;
|
||||||
@ -242,6 +240,10 @@ struct Descriptor
|
|||||||
BufferView buf_view;
|
BufferView buf_view;
|
||||||
VkSampler sampler;
|
VkSampler sampler;
|
||||||
}
|
}
|
||||||
|
DescType type;
|
||||||
|
u32 binding;
|
||||||
|
u32 index;
|
||||||
|
bool array_elem;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum MipmapMode : VkSamplerMipmapMode
|
enum MipmapMode : VkSamplerMipmapMode
|
||||||
@ -2021,6 +2023,11 @@ PrepareWrite(Vulkan* vk, VkWriteDescriptorSet* write, DescSet set, Descriptor* d
|
|||||||
write.dstBinding = desc.binding;
|
write.dstBinding = desc.binding;
|
||||||
write.descriptorCount = 1;
|
write.descriptorCount = 1;
|
||||||
|
|
||||||
|
if(desc.array_elem)
|
||||||
|
{
|
||||||
|
write.dstArrayElement = desc.index;
|
||||||
|
}
|
||||||
|
|
||||||
switch(desc.type) with(DescType)
|
switch(desc.type) with(DescType)
|
||||||
{
|
{
|
||||||
case Image, StorageImage, InputAttach:
|
case Image, StorageImage, InputAttach:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user