Module: Mesa
Branch: main
Commit: b900bb22094d0608e739ed1d7ef65e14bdde84da
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b900bb22094d0608e739ed1d7ef65e14bdde84da

Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Oct 18 11:42:04 2022 -0400

zink: always take the compact descriptor size path with kernel shaders

this guarantees compaction of the size arrays

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19327>

---

 src/gallium/drivers/zink/zink_descriptors.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_descriptors.c 
b/src/gallium/drivers/zink/zink_descriptors.c
index 00b07465a75..1d0965224e5 100644
--- a/src/gallium/drivers/zink/zink_descriptors.c
+++ b/src/gallium/drivers/zink/zink_descriptors.c
@@ -486,7 +486,7 @@ zink_descriptor_program_init(struct zink_context *ctx, 
struct zink_program *pg)
          /* some sets can have multiple descriptor types: ensure the size 
arrays for these types are contiguous for creating the pool key */
          VkDescriptorPoolSize *sz = &sizes[idx];
          VkDescriptorPoolSize sz2[4];
-         if (screen->compact_descriptors) {
+         if (screen->compact_descriptors || (pg->is_compute && 
stages[0]->nir->info.stage == MESA_SHADER_KERNEL)) {
             unsigned found = 0;
             while (found < num_type_sizes[desc_type]) {
                if (sz->descriptorCount) {

Reply via email to