zink: skip extra descriptor lookups for images during barrier updates
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 15 Feb 2022 14:15:57 +0000 (09:15 -0500)
committerMarge Bot <emma+marge@anholt.net>
Sat, 26 Feb 2022 15:26:08 +0000 (15:26 +0000)
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15173>

src/gallium/drivers/zink/zink_draw.cpp

index f4e225c..214a1a7 100644 (file)
@@ -407,10 +407,12 @@ update_barriers(struct zink_context *ctx, bool is_compute)
          if (is_compute)
             pipeline = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
          else if (!pipeline) {
-            if (res->ubo_bind_count[0])
-               pipeline |= find_pipeline_bits(res->ubo_bind_mask);
-            if (!pipeline)
-               pipeline |= find_pipeline_bits(res->ssbo_bind_mask);
+            if (res->obj->is_buffer) {
+               if (res->ubo_bind_count[0])
+                  pipeline |= find_pipeline_bits(res->ubo_bind_mask);
+               if (!pipeline)
+                  pipeline |= find_pipeline_bits(res->ssbo_bind_mask);
+            }
             if (!pipeline)
                pipeline |= find_pipeline_bits(res->sampler_binds);
             if (!pipeline) //must be a shader image