From 6d5a2ae9281a7f07a7cbb05b8beba1a5a9b82965 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 1 Nov 2024 12:55:34 +0100 Subject: [PATCH] aco: clear the current wave exception in the trap handler This is required to re-enable VALU instructions in this wave, only float exception seem to be affected. Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index cfb402b30dc..052442e62c3 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -12438,6 +12438,11 @@ select_trap_handler_shader(Program* program, struct nir_shader* shader, ac_shade ac_hw_cache_flags cache_glc; cache_glc.value = ac_glc; + /* Clear the current wave exception, this is required to re-enable VALU + * instructions in this wave. Seems to be only needed for float exceptions. + */ + bld.vop1(aco_opcode::v_clrexcp); + if (ctx.program->gfx_level >= GFX9) { /* Get TMA. */ bld.sopk(aco_opcode::s_getreg_b32, Definition(PhysReg{ttmp10}, s1),