diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index bffd93b47b0..e84436375c7 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -10844,7 +10844,8 @@ create_fs_null_export(isel_context* ctx) */ Builder bld(ctx->program, ctx->block); - unsigned dest = V_008DFC_SQ_EXP_NULL; + /* GFX11 doesn't support NULL exports, and MRT0 should be exported instead. */ + unsigned dest = ctx->options->chip_class >= GFX11 ? V_008DFC_SQ_EXP_MRT : V_008DFC_SQ_EXP_NULL; bld.exp(aco_opcode::exp, Operand(v1), Operand(v1), Operand(v1), Operand(v1), /* enabled_mask */ 0, dest, /* compr */ false, /* done */ true, /* vm */ true); } diff --git a/src/amd/compiler/aco_lower_to_hw_instr.cpp b/src/amd/compiler/aco_lower_to_hw_instr.cpp index d085fb67219..94747db3061 100644 --- a/src/amd/compiler/aco_lower_to_hw_instr.cpp +++ b/src/amd/compiler/aco_lower_to_hw_instr.cpp @@ -2030,7 +2030,8 @@ lower_to_hw_instr(Program* program) bld.reset(discard_block); bld.exp(aco_opcode::exp, Operand(v1), Operand(v1), Operand(v1), Operand(v1), 0, - V_008DFC_SQ_EXP_NULL, false, true, true); + program->chip_class >= GFX11 ? V_008DFC_SQ_EXP_MRT : V_008DFC_SQ_EXP_NULL, + false, true, true); bld.sopp(aco_opcode::s_endpgm); bld.reset(&ctx.instructions);