Permalink
Browse files

GPU: Avoid memory corruption on bone matrix > 96.

See #9574.  Seen in Zill O'll Infinite, thanks to Kitsu-neechan for
tracking this down.
  • Loading branch information...
unknownbrackets committed Dec 26, 2017
1 parent 9b909b4 commit 93a712660c74734f846102067bfb64ac509e6f05
Showing with 2 additions and 1 deletion.
  1. +2 −1 GPU/GPUCommon.cpp
View
@@ -1739,7 +1739,8 @@ void GPUCommon::Execute_BoneMtxNum(u32 op, u32 diff) {
const int end = 12 * 8 - (op & 0x7F);
int i = 0;
bool fastLoad = !debugRecording_;
// TODO: Validate what should happen when explicitly setting num to 96 or higher.
bool fastLoad = !debugRecording_ && end > 0;
if (currentList->pc < currentList->stall && currentList->pc + end * 4 >= currentList->stall) {
fastLoad = false;
}

0 comments on commit 93a7126

Please sign in to comment.