[PICA] Start implementing shader interpreter
This commit is contained in:
14
src/core/PICA/shader_interpreter.cpp
Normal file
14
src/core/PICA/shader_interpreter.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "PICA/shader.hpp"
|
||||
|
||||
void PICAShader::run() {
|
||||
u32 pc = 0; // Program counter
|
||||
|
||||
while (true) {
|
||||
const u32 instruction = loadedShader[pc++];
|
||||
const u32 opcode = instruction >> 26; // Top 6 bits are the opcode
|
||||
|
||||
switch (opcode) {
|
||||
default:Helpers::panic("Unimplemented PICA instruction %08X (Opcode = %02X)", instruction, opcode);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user