Mesa (staging/22.0): zink: handle 0 ubos and 0 ssbos in pipeline layout

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 14 01:26:46 UTC 2022


Module: Mesa
Branch: staging/22.0
Commit: eb8e830940459a2dbc1cf2d568a63af2b29fcb60
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb8e830940459a2dbc1cf2d568a63af2b29fcb60

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>
(cherry picked from commit 23c758807e76183cd2dbd5ee97f296bde167c93b)

---

 .pick_status.json                                | 2 +-
 src/gallium/drivers/zink/zink_descriptors_lazy.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 17dd7ac7789..674f324f13c 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -748,7 +748,7 @@
         "description": "zink: handle 0 ubos and 0 ssbos in pipeline layout",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "because_sha": null
     },
     {
diff --git a/src/gallium/drivers/zink/zink_descriptors_lazy.c b/src/gallium/drivers/zink/zink_descriptors_lazy.c
index 3c15ab9fd2d..398c4f06fac 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