瀏覽代碼

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 <siglesias@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable@lists.freedesktop.org
tags/18.0-branchpoint
Samuel Iglesias Gonsálvez 7 年之前
父節點
當前提交
e63adf8b1e
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. 3
    1
      src/intel/vulkan/anv_descriptor_set.c

+ 3
- 1
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

Loading…
取消
儲存