From 281eb14df80ab19c8680dc33aed98a4f305e3e31 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 31 Oct 2024 16:54:34 +0100 Subject: [PATCH] aco: fix reading registers from the trap handler shader It should read 32-bit values, otherwise some MSB are 0 and it's missing some information. Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 2d3ec2414c8..d2c70255d2b 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -12452,7 +12452,7 @@ select_trap_handler_shader(Program* program, struct nir_shader* shader, ac_shade for (unsigned i = 0; i < ARRAY_SIZE(hw_regs_idx); i++) { /* "((size - 1) << 11) | register" */ bld.sopk(aco_opcode::s_getreg_b32, Definition(PhysReg{ttmp8}, s1), - ((20 - 1) << 11) | hw_regs_idx[i]); + ((32 - 1) << 11) | hw_regs_idx[i]); bld.smem(aco_opcode::s_buffer_store_dword, Operand(PhysReg{ttmp4}, s4), Operand::c32(8u + i * 4), Operand(PhysReg{ttmp8}, s1), memory_sync_info(),