mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 14:45:41 +12:00
[PICA] Indexed add
This commit is contained in:
parent
c41d9b4462
commit
63075f1830
2 changed files with 3 additions and 4 deletions
|
@ -180,8 +180,7 @@ public:
|
|||
}
|
||||
|
||||
void setBufferIndex(u32 index) {
|
||||
if (index != 0) Helpers::panic("How many bits is the shader buffer index reg meant to be?");
|
||||
bufferIndex = (index >> 2) & 0xfff;
|
||||
bufferIndex = index & 0xfff;
|
||||
}
|
||||
|
||||
void setOpDescriptorIndex(u32 index) {
|
||||
|
|
|
@ -136,12 +136,12 @@ bool PICAShader::isCondTrue(u32 instruction) {
|
|||
|
||||
void PICAShader::add(u32 instruction) {
|
||||
const u32 operandDescriptor = operandDescriptors[instruction & 0x7f];
|
||||
const u32 src1 = (instruction >> 12) & 0x7f;
|
||||
u32 src1 = (instruction >> 12) & 0x7f;
|
||||
const u32 src2 = (instruction >> 7) & 0x1f; // src2 coming first because PICA moment
|
||||
const u32 idx = (instruction >> 19) & 3;
|
||||
const u32 dest = (instruction >> 21) & 0x1f;
|
||||
|
||||
if (idx) Helpers::panic("[PICA] ADD: idx != 0");
|
||||
src1 = getIndexedSource(src1, idx);
|
||||
vec4f srcVec1 = getSourceSwizzled<1>(src1, operandDescriptor);
|
||||
vec4f srcVec2 = getSourceSwizzled<2>(src2, operandDescriptor);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue