diff --git a/.pick_status.json b/.pick_status.json index a8a5626a473..24a482fb204 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -337,7 +337,7 @@ "description": "radeonsi: don't use sel->nir in si_check_blend_dst_sampler_noop", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "b78a38bd0223188ee585bfaa32384ef98527e016" }, diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index fbb214c2594..ca3001b56c2 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -641,6 +641,12 @@ static bool si_check_blend_dst_sampler_noop(struct si_context *sctx) { if (sctx->framebuffer.state.nr_cbufs == 1) { struct si_shader_selector *sel = sctx->shader.ps.cso; + + /* Wait for the shader to be ready. */ + util_queue_fence_wait(&sel->ready); + + assert(!sel->nir); + bool free_nir; if (unlikely(sel->info.writes_1_if_tex_is_1 == 0xff)) { struct nir_shader *nir = si_get_nir_shader(sel, &sctx->shader.ps.key, &free_nir); @@ -658,6 +664,7 @@ static bool si_check_blend_dst_sampler_noop(struct si_context *sctx) sel->info.writes_1_if_tex_is_1 = 0; } + assert(free_nir); if (free_nir) ralloc_free(nir); }