From 005db316cf59ef8d3004cd141eacac4682f76f81 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Sat, 1 Jul 2023 01:17:04 +0300 Subject: [PATCH] More shader instruction definitions --- include/PICA/shader.hpp | 4 ++++ src/core/PICA/dynapica/shader_rec_emitter_x64.cpp | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/include/PICA/shader.hpp b/include/PICA/shader.hpp index 71f11219..16ede661 100644 --- a/include/PICA/shader.hpp +++ b/include/PICA/shader.hpp @@ -17,6 +17,10 @@ namespace ShaderOpcodes { DP3 = 0x01, DP4 = 0x02, DPH = 0x03, + DST = 0x04, + EX2 = 0x05, + LG2 = 0x06, + LIT = 0x07, MUL = 0x08, SLT = 0x0A, FLR = 0x0B, diff --git a/src/core/PICA/dynapica/shader_rec_emitter_x64.cpp b/src/core/PICA/dynapica/shader_rec_emitter_x64.cpp index 6a2423fb..cce9b3de 100644 --- a/src/core/PICA/dynapica/shader_rec_emitter_x64.cpp +++ b/src/core/PICA/dynapica/shader_rec_emitter_x64.cpp @@ -150,8 +150,13 @@ void ShaderEmitter::compileInstruction(const PICAShader& shaderUnit) { case ShaderOpcodes::RCP: recRCP(shaderUnit, instruction); break; case ShaderOpcodes::RSQ: recRSQ(shaderUnit, instruction); break; + // Unimplemented opcodes that don't seem to actually be used but exist in the binary + // EMIT/SETEMIT are used in geometry shaders, however are sometimes found in vertex shaders? + case ShaderOpcodes::EX2: + case ShaderOpcodes::LG2: case ShaderOpcodes::EMIT: case ShaderOpcodes::SETEMIT: + log("[ShaderJIT] Unknown PICA opcode: %02X\n", opcode); emitPrintLog(shaderUnit); break;