mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-08 23:25:40 +12:00
[Shader JIT] Add index = 3 to indexed register addressing
This commit is contained in:
parent
3f2b713c4b
commit
f538d38c98
1 changed files with 7 additions and 1 deletions
|
@ -95,7 +95,7 @@ void ShaderEmitter::compileInstruction(const PICAShader& shaderUnit) {
|
||||||
// See if PC is a possible return PC and emit the proper code if so
|
// See if PC is a possible return PC and emit the proper code if so
|
||||||
if (std::binary_search(returnPCs.begin(), returnPCs.end(), recompilerPC)) {
|
if (std::binary_search(returnPCs.begin(), returnPCs.end(), recompilerPC)) {
|
||||||
const auto stackOffsetForPC = getStackOffsetOfReturnPC();
|
const auto stackOffsetForPC = getStackOffsetOfReturnPC();
|
||||||
|
|
||||||
Label end;
|
Label end;
|
||||||
// Check if return address == recompilerPC, ie if we should return
|
// Check if return address == recompilerPC, ie if we should return
|
||||||
cmp(dword[rsp + stackOffsetForPC], recompilerPC);
|
cmp(dword[rsp + stackOffsetForPC], recompilerPC);
|
||||||
|
@ -221,6 +221,12 @@ void ShaderEmitter::loadRegister(Xmm dest, const PICAShader& shader, u32 src, u3
|
||||||
movsxd(rax, dword[statePointer + addrYOffset]); // rax = address register y
|
movsxd(rax, dword[statePointer + addrYOffset]); // rax = address register y
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case 3: {
|
||||||
|
const uintptr_t loopCounterOffset = uintptr_t(&shader.loopCounter) - uintptr_t(&shader);
|
||||||
|
mov(eax, dword[statePointer + loopCounterOffset]); // rax = loop counter
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Helpers::panic("[ShaderJIT]: Unimplemented source index type %d", index);
|
Helpers::panic("[ShaderJIT]: Unimplemented source index type %d", index);
|
||||||
|
|
Loading…
Add table
Reference in a new issue