Skip to content

Commit

Permalink
ShaderJIT: Make BREAK(C) emit a warning instead of crashing until imp…
Browse files Browse the repository at this point in the history
…lemented
  • Loading branch information
wheremyfoodat committed Sep 16, 2023
1 parent 011dd1b commit 1f8194d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/PICA/shader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ namespace ShaderOpcodes {
DSTI = 0x19,
SGEI = 0x1A,
SLTI = 0x1B,
BREAK = 0x20,
NOP = 0x21,
END = 0x22,
BREAKC = 0x23,
CALL = 0x24,
CALLC = 0x25,
CALLU = 0x26,
Expand Down
3 changes: 3 additions & 0 deletions src/core/PICA/dynapica/shader_rec_emitter_x64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ void ShaderEmitter::compileInstruction(const PICAShader& shaderUnit) {
emitPrintLog(shaderUnit);
break;

case ShaderOpcodes::BREAK:
case ShaderOpcodes::BREAKC: Helpers::warn("[Shader JIT] Unimplemented BREAK(C) instruction!"); break;

// We consider both MAD and MADI to be the same instruction and decode which one we actually have in recMAD
case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37:
case 0x38: case 0x39: case 0x3A: case 0x3B: case 0x3C: case 0x3D: case 0x3E: case 0x3F:
Expand Down

0 comments on commit 1f8194d

Please sign in to comment.