Fix invalid usage of descriptorCount for inline uniform
authorHyunjun Ko <zzoon@igalia.com>
Wed, 23 Nov 2022 08:46:24 +0000 (17:46 +0900)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 1 Dec 2022 16:37:12 +0000 (16:37 +0000)
 blocks.

Affects:
dEQP-VK.binding_model.descriptorset_random.*.iublimit*

VK-GL-CTS Issue: 4115

Components: Vulkan

Change-Id: I649d86b859ca642b47c1fda4aa915e1d6616c898

external/vulkancts/modules/vulkan/binding_model/vktBindingDescriptorSetRandomTests.cpp

index 7d461f9..1e2a702 100644 (file)
@@ -594,6 +594,13 @@ void generateRandomLayout(RandomLayout& randomLayout, const CaseDef &caseDef, de
                                                binding.descriptorCount = (arraySizes[b] ? arraySizes[b] : 1) * 16 + 16; // add 16 for "ivec4 unused"
                                                numInlineUniformBlocks++;
                                        }
+                                       else
+                                       {
+                                               // The meaning of descriptorCount for inline uniform blocks is diferrent from usual, which means
+                                               // (descriptorCount == 0) doesn't mean it will be discarded.
+                                               // So we use a similar trick to the below by replacing with a different type of descriptor.
+                                               binding.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
+                                       }
                                }
                                else
                                {