Added descriptorindexing sample to CMake.
Fixed variable descriptor size validation error.
This commit is contained in:
parent
846413cc4b
commit
4a11ae0c5a
2 changed files with 11 additions and 0 deletions
|
|
@ -75,6 +75,7 @@ set(EXAMPLES
|
|||
deferred
|
||||
deferredmultisampling
|
||||
deferredshadows
|
||||
descriptorindexing
|
||||
descriptorsets
|
||||
displacement
|
||||
distancefieldfonts
|
||||
|
|
|
|||
|
|
@ -292,7 +292,17 @@ public:
|
|||
Descriptor sets
|
||||
*/
|
||||
|
||||
VkDescriptorSetVariableDescriptorCountAllocateInfo variableDescriptorCountAllocInfo = {};
|
||||
|
||||
uint32_t variableDescCounts[] = {textures.size()};
|
||||
|
||||
variableDescriptorCountAllocInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO;
|
||||
variableDescriptorCountAllocInfo.descriptorSetCount = 1;
|
||||
variableDescriptorCountAllocInfo.pDescriptorCounts = variableDescCounts;
|
||||
|
||||
VkDescriptorSetAllocateInfo allocInfo = vks::initializers::descriptorSetAllocateInfo(descriptorPool, &descriptorSetLayout, 1);
|
||||
allocInfo.pNext = &variableDescriptorCountAllocInfo;
|
||||
|
||||
VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &allocInfo, &descriptorSet));
|
||||
|
||||
std::vector<VkWriteDescriptorSet> writeDescriptorSets(2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue