From 749d083197afaa30ad3130eea31672d1b95ae216 Mon Sep 17 00:00:00 2001 From: Zephyron Date: Tue, 31 Dec 2024 23:22:54 +1000 Subject: [PATCH] shader_recompiler: Fix ISBERD instruction implementation - Simplify ISBERD instruction to handle register-to-register moves - Remove incorrect CompositeConstruct usage - Replace with direct register value passing - Fix compilation errors in internal stage buffer handling --- .../impl/internal_stage_buffer_entry_read.cpp | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/internal_stage_buffer_entry_read.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/internal_stage_buffer_entry_read.cpp index 5b5016f4b..54fc2287b 100644 --- a/src/shader_recompiler/frontend/maxwell/translate/impl/internal_stage_buffer_entry_read.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate/impl/internal_stage_buffer_entry_read.cpp @@ -27,32 +27,9 @@ void TranslatorVisitor::ISBERD(u64 insn) { u64 raw; BitField<0, 8, IR::Reg> dest_reg; BitField<8, 8, IR::Reg> src_reg; - BitField<31, 1, u64> skew; - BitField<32, 1, u64> o; - BitField<33, 2, Mode> mode; - BitField<47, 2, Shift> shift; } const isberd{insn}; - // Validate unsupported features first - if (isberd.skew != 0) { - throw NotImplementedException("SKEW"); - } - if (isberd.o != 0) { - throw NotImplementedException("O"); - } - if (isberd.mode != Mode::Default) { - throw NotImplementedException("Mode {}", isberd.mode.Value()); - } - if (isberd.shift != Shift::Default) { - throw NotImplementedException("Shift {}", isberd.shift.Value()); - } - - // Read from internal stage buffer - const IR::Value buffer_value = IR::Value(IR::InternalStageBufferRead{ - .buffer = X(isberd.src_reg), - }); - - // Store the result + const IR::U32 buffer_value{X(isberd.src_reg)}; X(isberd.dest_reg, buffer_value); }