Skip to content

Commit

Permalink
Don't use maxV when it's 0.
Browse files Browse the repository at this point in the history
That means we couldn't tell.  Fixes #8353.
  • Loading branch information
unknownbrackets committed Jan 3, 2016
1 parent 2494176 commit 35d1379
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GPU/GLES/TextureCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ void TextureCache::ApplyTexture() {
// Texture scale/offset and gen modes don't apply in through.
// So we can optimize how much of the texture we look at.
if (gstate.isModeThrough()) {
if (nextTexture_->maxSeenV == 0) {
if (nextTexture_->maxSeenV == 0 && gstate_c.vertBounds.maxV > 0) {
// Let's not hash less than 272, we might use more later and have to rehash. 272 is very common.
nextTexture_->maxSeenV = std::max((u16)272, gstate_c.vertBounds.maxV);
} else if (gstate_c.vertBounds.maxV > nextTexture_->maxSeenV) {
Expand Down

0 comments on commit 35d1379

Please sign in to comment.