mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 11:20:20 +01:00
radeonsi: don't use sel->nir in si_check_blend_dst_sampler_noop
We don't want to modify sel->nir so force the use of the serialized
version of the shader.
Waiting on sel->ready guarantees that sel->nir will be NULL and that
si_get_nir_shader will use sel->nir_binary.
Fixes: b78a38bd02 ("radeonsi: use si_nir_is_output_const_if_tex_is_const")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6415
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16587>
This commit is contained in:
parent
4642e268e2
commit
ef950d370a
1 changed files with 7 additions and 0 deletions
|
|
@ -655,6 +655,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);
|
||||
|
|
@ -672,6 +678,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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue