summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsálvez <[email protected]>2018-01-11 11:15:30 +0100
committerSamuel Iglesias Gonsálvez <[email protected]>2018-01-12 07:08:51 +0100
commite63adf8b1ea56c9c2d0794f563bced765fb8300a (patch)
tree9bef57d735afafde602952101aa6f64f62a03839 /src/intel
parent734bef372d80a2ebf5677eb4fbd0e939f2b3cfb4 (diff)
anv: VkDescriptorSetLayoutBinding can have descriptorCount == 0
From Vulkan spec: "descriptorCount is the number of descriptors contained in the binding, accessed in a shader as an array. If descriptorCount is zero this binding entry is reserved and the resource must not be accessed from any stage via this binding within any pipeline using the set layout." Fixes: dEQP-VK.binding_model.descriptor_update.empty_descriptor.uniform_buffer Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Cc: [email protected]
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_descriptor_set.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c
index 629c041eedf..e4e39f5c7b4 100644
--- a/src/intel/vulkan/anv_descriptor_set.c
+++ b/src/intel/vulkan/anv_descriptor_set.c
@@ -103,7 +103,9 @@ VkResult anv_CreateDescriptorSetLayout(
if (binding == NULL)
continue;
- assert(binding->descriptorCount > 0);
+ if (binding->descriptorCount == 0)
+ continue;
+
#ifndef NDEBUG
set_layout->binding[b].type = binding->descriptorType;
#endif