Skip to content

Commit

Permalink
Update maxSeenV earlier.
Browse files Browse the repository at this point in the history
Now, the initial fullhash is already on the correct range.
  • Loading branch information
unknownbrackets committed May 1, 2016
1 parent 6bd86f4 commit bfe2336
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions GPU/GLES/TextureCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,8 @@ void TextureCache::ApplyTexture() {
}
nextTexture_ = nullptr;

UpdateMaxSeenV(entry, gstate.isModeThrough());

bool replaceImages = false;
if (nextNeedsRebuild_) {
if (nextNeedsRehash_) {
Expand All @@ -796,6 +798,7 @@ void TextureCache::ApplyTexture() {
// Secondary cache picked a different texture, use it.
entry = nextTexture_;
nextTexture_ = nullptr;
UpdateMaxSeenV(entry, gstate.isModeThrough());
}
}

Expand All @@ -808,8 +811,6 @@ void TextureCache::ApplyTexture() {
if (entry->framebuffer) {
ApplyTextureFramebuffer(entry, entry->framebuffer);
} else {
UpdateMaxSeenV(entry, gstate.isModeThrough());

if (entry->textureName != lastBoundTexture) {
glBindTexture(GL_TEXTURE_2D, entry->textureName);
lastBoundTexture = entry->textureName;
Expand Down Expand Up @@ -1210,8 +1211,6 @@ void TextureCache::SetTexture(bool force) {
VERBOSE_LOG(G3D, "Texture at %08x Found in Cache, applying", texaddr);
return; //Done!
} else {
entry->cluthash = cluthash;
nextTexture_ = entry;
nextChangeReason_ = reason;
nextNeedsChange_ = true;
}
Expand Down

0 comments on commit bfe2336

Please sign in to comment.