Mesa (staging/21.3): zink: always unset vertex shader variant key data when changing last vertex stage

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 11 20:34:39 UTC 2022


Module: Mesa
Branch: staging/21.3
Commit: 96e40074b69f73c04f5a5d63aae0a754229e2e12
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=96e40074b69f73c04f5a5d63aae0a754229e2e12

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Mon Jan 10 11:36:25 2022 -0500

zink: always unset vertex shader variant key data when changing last vertex stage

ensure that vertex key data is always zeroed when changing last stage since it will
be updated before draw anyway and can only cause problems if left alone here

fixes the following caselist:
dEQP-GLES31.functional.shaders.builtin_constants.tessellation_shader.max_tess_evaluation_texture_image_units
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.tessellation_output_quads_geometry_output_points
dEQP-GLES31.functional.ubo.random.all_per_block_buffers.25

cc: mesa-stable

Reviewed-by: Hoe Hao Cheng <haochengho12907 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14482>
(cherry picked from commit d15ff96da2062e7a2474dd916c0090a983ea37f1)

---

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

diff --git a/.pick_status.json b/.pick_status.json
index 613f045f99b..b38f0b9d46e 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -67,7 +67,7 @@
         "description": "zink: always unset vertex shader variant key data when changing last vertex stage",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c
index 936de65cfbf..6e69c0cb461 100644
--- a/src/gallium/drivers/zink/zink_program.c
+++ b/src/gallium/drivers/zink/zink_program.c
@@ -821,6 +821,9 @@ bind_last_vertex_stage(struct zink_context *ctx)
       if (old != PIPE_SHADER_TYPES) {
          memset(&ctx->gfx_pipeline_state.shader_keys.key[old].key.vs_base, 0, sizeof(struct zink_vs_key_base));
          ctx->dirty_shader_stages |= BITFIELD_BIT(old);
+      } else {
+         /* always unset vertex shader values when changing to a non-vs last stage */
+         memset(&ctx->gfx_pipeline_state.shader_keys.key[PIPE_SHADER_VERTEX].key.vs_base, 0, sizeof(struct zink_vs_key_base));
       }
       ctx->last_vertex_stage_dirty = true;
    }



More information about the mesa-commit mailing list