[Mesa-dev] [PATCH] anv: VkDescriptorSetLayoutBinding can have descriptorCount == 0
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Thu Jan 11 12:40:53 UTC 2018
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Probably Cc stable too.
Thanks!
On 11/01/18 11:09, Samuel Iglesias Gonsálvez wrote:
> 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 at igalia.com>
> ---
> src/intel/vulkan/anv_descriptor_set.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> 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
More information about the mesa-dev
mailing list