mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-22 05:15:51 +12:00
[PICA] Start implementing shader interpreter
This commit is contained in:
parent
4b3c7955dd
commit
057aa57422
5 changed files with 32 additions and 6 deletions
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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue