[Shader JIT] Stub EMIT/SETEMIT

This commit is contained in:
wheremyfoodat 2023-06-30 14:39:25 +03:00
parent 3476d336ca
commit 3199f8ae67
3 changed files with 10 additions and 0 deletions

View file

@ -80,6 +80,7 @@ class ShaderEmitter : public Xbyak::CodeGenerator {
void recCMP(const PICAShader& shader, u32 instruction);
void recDP3(const PICAShader& shader, u32 instruction);
void recDP4(const PICAShader& shader, u32 instruction);
void recEMIT(const PICAShader& shader, u32 instruction);
void recEND(const PICAShader& shader, u32 instruction);
void recFLR(const PICAShader& shader, u32 instruction);
void recIFC(const PICAShader& shader, u32 instruction);
@ -95,6 +96,7 @@ class ShaderEmitter : public Xbyak::CodeGenerator {
void recMUL(const PICAShader& shader, u32 instruction);
void recRCP(const PICAShader& shader, u32 instruction);
void recRSQ(const PICAShader& shader, u32 instruction);
void recSETEMIT(const PICAShader& shader, u32 instruction);
void recSGE(const PICAShader& shader, u32 instruction);
void recSGEI(const PICAShader& shader, u32 instruction);
void recSLT(const PICAShader& shader, u32 instruction);

View file

@ -16,6 +16,7 @@ namespace ShaderOpcodes {
ADD = 0x00,
DP3 = 0x01,
DP4 = 0x02,
DPH = 0x03,
MUL = 0x08,
SLT = 0x0A,
FLR = 0x0B,
@ -35,6 +36,8 @@ namespace ShaderOpcodes {
IFU = 0x27,
IFC = 0x28,
LOOP = 0x29,
EMIT = 0x2A,
SETEMIT = 0x2B,
JMPC = 0x2C,
JMPU = 0x2D,
CMP1 = 0x2E, // Both of these instructions are CMP

View file

@ -150,6 +150,11 @@ void ShaderEmitter::compileInstruction(const PICAShader& shaderUnit) {
case ShaderOpcodes::RCP: recRCP(shaderUnit, instruction); break;
case ShaderOpcodes::RSQ: recRSQ(shaderUnit, instruction); break;
case ShaderOpcodes::EMIT:
case ShaderOpcodes::SETEMIT:
emitPrintLog(shaderUnit);
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: