Mesa (main): zink: handle 0 ubos and 0 ssbos in pipeline layout
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 12 05:08:01 UTC 2022
Module: Mesa
Branch: main
Commit: 23c758807e76183cd2dbd5ee97f296bde167c93b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=23c758807e76183cd2dbd5ee97f296bde167c93b
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Mon Apr 11 15:07:11 2022 -0400
zink: handle 0 ubos and 0 ssbos in pipeline layout
this is the number of types needed, and it can be zero
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15853>
---
src/gallium/drivers/zink/zink_descriptors_lazy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_descriptors_lazy.c b/src/gallium/drivers/zink/zink_descriptors_lazy.c
index 83bac2d5739..9fc3f052d8f 100644
--- a/src/gallium/drivers/zink/zink_descriptors_lazy.c
+++ b/src/gallium/drivers/zink/zink_descriptors_lazy.c
@@ -132,12 +132,12 @@ descriptor_program_num_sizes(VkDescriptorPoolSize *sizes, enum zink_descriptor_t
{
switch (type) {
case ZINK_DESCRIPTOR_TYPE_UBO:
- return 1;
+ return !!sizes[ZDS_INDEX_UBO].descriptorCount;
case ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW:
return !!sizes[ZDS_INDEX_COMBINED_SAMPLER].descriptorCount +
!!sizes[ZDS_INDEX_UNIFORM_TEXELS].descriptorCount;
case ZINK_DESCRIPTOR_TYPE_SSBO:
- return 1;
+ return !!sizes[ZDS_INDEX_STORAGE_BUFFER].descriptorCount;
case ZINK_DESCRIPTOR_TYPE_IMAGE:
return !!sizes[ZDS_INDEX_STORAGE_IMAGE].descriptorCount +
!!sizes[ZDS_INDEX_STORAGE_TEXELS].descriptorCount;
More information about the mesa-commit
mailing list