summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-04-19 14:43:01 -0500
committerJason Ekstrand <[email protected]>2019-04-19 23:26:41 +0000
commit2b388c3d0404ab8cc20945b9d4c369c9051c2205 (patch)
treeeb5dd8a0676f593263aad52f419596fc4c0c2847 /src/intel
parent648cda258b48bd1dbd7af988e149320dfcee0998 (diff)
anv: Ignore descriptor binding flags if bindingCount == 0
I missed this on the first go round. The bindingCount field of VkDescriptorSetLayoutBindingFlagsCreateInfoEXT is allowed to be zero which means the flags array is ignored. Fixes: d6c9bd6e01b4d "anv: Put binding flags in descriptor set layouts" Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_descriptor_set.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c
index 1ad89185dd7..da689d285fc 100644
--- a/src/intel/vulkan/anv_descriptor_set.c
+++ b/src/intel/vulkan/anv_descriptor_set.c
@@ -362,8 +362,6 @@ VkResult anv_CreateDescriptorSetLayout(
const VkDescriptorSetLayoutBindingFlagsCreateInfoEXT *binding_flags_info =
vk_find_struct_const(pCreateInfo->pNext,
DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT);
- if (binding_flags_info)
- assert(binding_flags_info->bindingCount == pCreateInfo->bindingCount);
for (uint32_t b = 0; b <= max_binding; b++) {
const VkDescriptorSetLayoutBinding *binding =
@@ -385,7 +383,8 @@ VkResult anv_CreateDescriptorSetLayout(
set_layout->binding[b].type = binding->descriptorType;
#endif
- if (binding_flags_info) {
+ if (binding_flags_info && binding_flags_info->bindingCount > 0) {
+ assert(binding_flags_info->bindingCount == pCreateInfo->bindingCount);
uint32_t binding_strct_idx = binding - pCreateInfo->pBindings;
assert(binding_strct_idx < binding_flags_info->bindingCount);
set_layout->binding[b].flags =