ac/nir/ps: fix null export write mask miss set to 0xf

Fixes: c182154456 ("ac/nir: add ac_nir_lower_ps")
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199>
(cherry picked from commit 01f4addc18)
This commit is contained in:
Rhys Perry 2023-04-25 21:13:11 +08:00 committed by Eric Engestrom
parent 72d641acf7
commit 7ddbf31e62
2 changed files with 7 additions and 4 deletions

View file

@ -445,7 +445,7 @@
"description": "ac/nir/ps: fix null export write mask miss set to 0xf",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "c182154456288dbab23e87dbc5fc1962984caa92"
},

View file

@ -489,9 +489,12 @@ emit_ps_null_export(nir_builder *b, lower_ps_state *s)
unsigned target = s->options->gfx_level >= GFX11 ?
V_008DFC_SQ_EXP_MRT : V_008DFC_SQ_EXP_NULL;
nir_export_amd(b, nir_ssa_undef(b, 4, 32),
.base = target,
.flags = AC_EXP_FLAG_VALID_MASK | AC_EXP_FLAG_DONE);
nir_intrinsic_instr *intrin =
nir_export_amd(b, nir_ssa_undef(b, 4, 32),
.base = target,
.flags = AC_EXP_FLAG_VALID_MASK | AC_EXP_FLAG_DONE);
/* To avoid builder set write mask to 0xf. */
nir_intrinsic_set_write_mask(intrin, 0);
}
static void