venus: fix deqp tests failed on iub descriptor type
authorDawn Han <dawnhan@google.com>
Tue, 29 Nov 2022 23:31:34 +0000 (23:31 +0000)
committerMarge Bot <emma+marge@anholt.net>
Tue, 6 Dec 2022 19:50:53 +0000 (19:50 +0000)
Fixes: abae9d4831b ("Add the iub binding count tracking")

Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20064>

src/virtio/vulkan/vn_descriptor_set.c

index 134c1d4..82f3fbf 100644 (file)
@@ -502,8 +502,12 @@ vn_descriptor_pool_alloc_descriptors(
        * pool to exceed the value of
        * VkDescriptorPoolInlineUniformBlockCreateInfo::maxInlineUniformBlockBindings
        * used to create the descriptor pool.
+       *
+       * 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.
        */
-      if (type == VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK) {
+      if (type == VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK && count != 0) {
          if (++pool->used.iub_binding_count > pool->max.iub_binding_count)
             goto fail;
       }