mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 06:05:40 +12:00
GPU registers: Fix writes to some registers ignoring the mask (#725)
Co-authored-by: henry <23128103+atem2069@users.noreply.github.com>
This commit is contained in:
parent
2da79414d6
commit
0a0ea75013
1 changed files with 6 additions and 6 deletions
|
@ -284,7 +284,7 @@ void GPU::writeInternalReg(u32 index, u32 value, u32 mask) {
|
|||
break;
|
||||
|
||||
case VertexShaderOpDescriptorIndex: {
|
||||
shaderUnit.vs.setOpDescriptorIndex(value);
|
||||
shaderUnit.vs.setOpDescriptorIndex(newValue);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -301,7 +301,7 @@ void GPU::writeInternalReg(u32 index, u32 value, u32 mask) {
|
|||
}
|
||||
|
||||
case VertexBoolUniform: {
|
||||
shaderUnit.vs.uploadBoolUniform(value & 0xffff);
|
||||
shaderUnit.vs.uploadBoolUniform(newValue & 0xffff);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -309,7 +309,7 @@ void GPU::writeInternalReg(u32 index, u32 value, u32 mask) {
|
|||
case VertexIntUniform1:
|
||||
case VertexIntUniform2:
|
||||
case VertexIntUniform3: {
|
||||
shaderUnit.vs.uploadIntUniform(index - VertexIntUniform0, value);
|
||||
shaderUnit.vs.uploadIntUniform(index - VertexIntUniform0, newValue);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -326,7 +326,7 @@ void GPU::writeInternalReg(u32 index, u32 value, u32 mask) {
|
|||
}
|
||||
|
||||
case VertexShaderEntrypoint: {
|
||||
shaderUnit.vs.entrypoint = value & 0xffff;
|
||||
shaderUnit.vs.entrypoint = newValue & 0xffff;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -336,13 +336,13 @@ void GPU::writeInternalReg(u32 index, u32 value, u32 mask) {
|
|||
break;
|
||||
*/
|
||||
|
||||
case VertexShaderTransferIndex: shaderUnit.vs.setBufferIndex(value); break;
|
||||
case VertexShaderTransferIndex: shaderUnit.vs.setBufferIndex(newValue); break;
|
||||
|
||||
// Command lists can write to the command processor registers and change the command list stream
|
||||
// Several games are known to do this, including New Super Mario Bros 2 and Super Mario 3D Land
|
||||
case CmdBufTrigger0:
|
||||
case CmdBufTrigger1: {
|
||||
if (value != 0) { // A non-zero value triggers command list processing
|
||||
if (newValue != 0) { // A non-zero value triggers command list processing
|
||||
int bufferIndex = index - CmdBufTrigger0; // Index of the command buffer to execute (0 or 1)
|
||||
u32 addr = (regs[CmdBufAddr0 + bufferIndex] & 0xfffffff) << 3;
|
||||
u32 size = (regs[CmdBufSize0 + bufferIndex] & 0xfffff) << 3;
|
||||
|
|
Loading…
Add table
Reference in a new issue