From 01f4addc18eb49838faa3b905abf79b05e72f07b Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Tue, 25 Apr 2023 21:13:11 +0800 Subject: [PATCH] ac/nir/ps: fix null export write mask miss set to 0xf Fixes: c1821544562 ("ac/nir: add ac_nir_lower_ps") Signed-off-by: Rhys Perry Reviewed-by: Qiang Yu Part-of: --- src/amd/common/ac_nir_lower_ps.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/amd/common/ac_nir_lower_ps.c b/src/amd/common/ac_nir_lower_ps.c index cdbc3cf..8a7caf6 100644 --- a/src/amd/common/ac_nir_lower_ps.c +++ b/src/amd/common/ac_nir_lower_ps.c @@ -715,9 +715,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 -- 2.7.4