From d15ff96da2062e7a2474dd916c0090a983ea37f1 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 10 Jan 2022 11:36:25 -0500 Subject: [PATCH] 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 Part-of: --- 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; }