From 4eb1d9106f329ca757dc2c1d0c3dfe514e625a97 Mon Sep 17 00:00:00 2001 From: SDK Chan Date: Tue, 29 Jul 2025 18:04:16 +0000 Subject: [PATCH] [shader_recompiler/Maxwell] Implement ISBERD shift operation --- .../impl/internal_stage_buffer_entry_read.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 59ca4b15a3..6b4ae96c2b 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 @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -46,7 +49,16 @@ void TranslatorVisitor::ISBERD(u64 insn) { throw NotImplementedException("Mode {}", isberd.mode.Value()); } if (isberd.shift != Shift::Default) { - throw NotImplementedException("Shift {}", isberd.shift.Value()); + IR::U32 result{}; + switch (static_cast(isberd.shift.Value())) { + case static_cast(Shift::U16): + result = ir.ShiftLeftLogical(result, static_cast(ir.Imm16(1))); + break; + case static_cast(Shift::B32): + result = ir.ShiftLeftLogical(result, ir.Imm32(1)); + break; + } + X(isberd.dest_reg, result); } //LOG_DEBUG(Shader, "(STUBBED) called {}", insn); if (isberd.src_reg_num == 0xFF) {