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

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 11 15:50:50 UTC 2022


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

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>

---

 src/gallium/drivers/zink/zink_program.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c
index 5778a09afaf..1b320f4ff4d 100644
--- a/src/gallium/drivers/zink/zink_program.c
+++ b/src/gallium/drivers/zink/zink_program.c
@@ -919,6 +919,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