Module: Mesa Branch: staging/23.3 Commit: eb9f7db980fe9b7377364d0278e0f048a011a270 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb9f7db980fe9b7377364d0278e0f048a011a270
Author: Mary Guillemard <[email protected]> Date: Thu Nov 2 06:37:31 2023 -0400 zink: Check for VK_EXT_extended_dynamic_state3 before setting A2C Fix crashes for piglit alpha-to-coverage tests when VK_EXT_extended_dynamic_state3 is not supported (like on Venus) Fixes: 736577871b9 ("zink: check for cbuf0 writes before setting A2C") Signed-off-by: Mary Guillemard <[email protected]> Reviewed-by: Antonino Maniscalco <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26003> (cherry picked from commit fe159c85de81a12e895342d003821aa4f25db8d5) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_program.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 9384d7962f6..3ce2a20b51f 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -164,7 +164,7 @@ "description": "zink: Check for VK_EXT_extended_dynamic_state3 before setting A2C", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "736577871b939573af400e4e64ebfe18863d49af", "notes": null diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c index c82607272d5..e50ad9c9c91 100644 --- a/src/gallium/drivers/zink/zink_program.c +++ b/src/gallium/drivers/zink/zink_program.c @@ -1871,7 +1871,8 @@ zink_bind_fs_state(struct pipe_context *pctx, if (cso) { shader_info *info = &ctx->gfx_stages[MESA_SHADER_FRAGMENT]->info; bool new_writes_cbuf0 = (info->outputs_written & BITFIELD_BIT(FRAG_RESULT_DATA0)) > 0; - if (ctx->gfx_pipeline_state.blend_state && ctx->gfx_pipeline_state.blend_state->alpha_to_coverage && writes_cbuf0 != new_writes_cbuf0) { + if (ctx->gfx_pipeline_state.blend_state && ctx->gfx_pipeline_state.blend_state->alpha_to_coverage && + writes_cbuf0 != new_writes_cbuf0 && zink_screen(pctx->screen)->info.have_EXT_extended_dynamic_state3) { ctx->blend_state_changed = true; ctx->ds3_states |= BITFIELD_BIT(ZINK_DS3_BLEND_A2C); }
