VERY experimental Nintendo Switch 2 emulator
C++
shader_decode: Implement SEL
ReinUsesLisp37f6b017a004
diff --git a/src/video_core/shader/decode/arithmetic_integer.cpp b/src/video_core/shader/decode/arithmetic_integer.cppindex 47b27ac5b2..429b868131 100644--- a/src/video_core/shader/decode/arithmetic_integer.cpp+++ b/src/video_core/shader/decode/arithmetic_integer.cpp@@ -41,6 +41,14 @@ u32 ShaderIR::DecodeArithmeticInteger(BasicBlock& bb, u32 pc) {SetRegister(bb, instr.gpr0, Operation(OperationCode::IAdd, PRECISE, op_a, op_b));break;}+ case OpCode::Id::SEL_C:+ case OpCode::Id::SEL_R:+ case OpCode::Id::SEL_IMM: {+ const Node condition = GetPredicate(instr.sel.pred, instr.sel.neg_pred != 0);+ const Node value = Operation(OperationCode::Select, PRECISE, condition, op_a, op_b);+ SetRegister(bb, instr.gpr0, value);+ break;+ }default:UNIMPLEMENTED_MSG("Unhandled ArithmeticInteger instruction: {}", opcode->get().GetName());}