From cc64df67764cfb4cad8a2ac622c809303d3ca5a8 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 5 Oct 2017 19:21:30 -0700 Subject: [PATCH] VK_KHR_maintenance3: Fix per-stage descriptor limit checks It wasn't actually checking the storage image limit (there were two copies of the storage buffer check instead) nor was it checking the input attachment limit. VK-GL-CTS issue: 750 Component: Vulkan Affects: dEQP-VK.api.maintenance3_check.descriptor_set Change-Id: I44cc388d0b20d4c1886db0d283c2b92712c54dc9 --- external/vulkancts/modules/vulkan/api/vktApiMaintenance3Check.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/external/vulkancts/modules/vulkan/api/vktApiMaintenance3Check.cpp b/external/vulkancts/modules/vulkan/api/vktApiMaintenance3Check.cpp index 4d67f11..32ea4dc 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiMaintenance3Check.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiMaintenance3Check.cpp @@ -222,6 +222,7 @@ private: deUint32 maxPerStageDescriptorStorageBuffers = 0u; deUint32 maxPerStageDescriptorSampledImages = 0u; deUint32 maxPerStageDescriptorStorageImages = 0u; + deUint32 maxPerStageDescriptorInputAttachments = 0u; for(deUint32 ndx = curNdx; ndx < curNdx + size; ++ndx) { @@ -245,6 +246,9 @@ private: if ((descriptorSetLayoutBinding[ndx].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) || (descriptorSetLayoutBinding[ndx].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER)) maxPerStageDescriptorStorageImages += descriptorSetLayoutBinding->descriptorCount; + + if (descriptorSetLayoutBinding[ndx].descriptorType == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT) + maxPerStageDescriptorInputAttachments += descriptorSetLayoutBinding->descriptorCount; } if (prop1.limits.maxPerStageDescriptorSamplers < maxPerStageDescriptorSamplers) @@ -255,7 +259,9 @@ private: return false; if (prop1.limits.maxPerStageDescriptorSampledImages < maxPerStageDescriptorSampledImages) return false; - if (prop1.limits.maxPerStageDescriptorStorageBuffers < maxPerStageDescriptorStorageBuffers) + if (prop1.limits.maxPerStageDescriptorStorageImages < maxPerStageDescriptorStorageImages) + return false; + if (prop1.limits.maxPerStageDescriptorInputAttachments < maxPerStageDescriptorInputAttachments) return false; return true; -- 2.7.4