zink: always update shader variants when rebinding a gfx program

the variant data may have changed in the meanwhile, so do a pass to
ensure that the correct variant is used

cc: mesa-stable

fixes caselist:
dEQP-GLES31.functional.shaders.sample_variables.sample_mask.discard_half_per_two_samples.multisample_texture_4
dEQP-GLES31.functional.shaders.sample_variables.sample_mask.discard_half_per_two_samples.singlesample_rbo

Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15226>
This commit is contained in:
Mike Blumenkrantz 2022-03-01 12:06:13 -05:00 committed by Marge Bot
parent 821a49981f
commit 9a6c58b2f7

View File

@ -215,6 +215,8 @@ update_gfx_program(struct zink_context *ctx)
prog = (struct zink_gfx_program*)entry->data;
u_foreach_bit(stage, prog->stages_present & ~ctx->dirty_shader_stages)
ctx->gfx_pipeline_state.modules[stage] = prog->modules[stage]->shader;
/* ensure variants are always updated if keys have changed since last use */
ctx->dirty_shader_stages |= prog->stages_present;
} else {
ctx->dirty_shader_stages |= bits;
prog = zink_create_gfx_program(ctx, ctx->gfx_stages, ctx->gfx_pipeline_state.vertices_per_patch + 1);