mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 20:49:12 +12:00
[PICA] Implement JMPC
This commit is contained in:
parent
3be6553207
commit
9f61fc0a4e
2 changed files with 8 additions and 0 deletions
|
@ -24,6 +24,7 @@ void PICAShader::run() {
|
|||
case ShaderOpcodes::END: return; // Stop running shader
|
||||
case ShaderOpcodes::IFC: ifc(instruction); break;
|
||||
case ShaderOpcodes::IFU: ifu(instruction); break;
|
||||
case ShaderOpcodes::JMPC: jmpc(instruction); break;
|
||||
case ShaderOpcodes::JMPU: jmpu(instruction); break;
|
||||
case ShaderOpcodes::LOOP: loop(instruction); break;
|
||||
case ShaderOpcodes::MAX: max(instruction); break;
|
||||
|
@ -492,6 +493,11 @@ void PICAShader::loop(u32 instruction) {
|
|||
loop.increment = uniform.z();
|
||||
}
|
||||
|
||||
void PICAShader::jmpc(u32 instruction) {
|
||||
if (isCondTrue(instruction))
|
||||
pc = (instruction >> 10) & 0xfff;
|
||||
}
|
||||
|
||||
void PICAShader::jmpu(u32 instruction) {
|
||||
const u32 test = (instruction & 1) ^ 1; // If the LSB is 0 we want to compare to true, otherwise compare to false
|
||||
const u32 dest = (instruction >> 10) & 0xfff;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue