diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index e061f5df53..abd968d292 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -660,11 +660,20 @@ void TextureCache::SetTexture() { cachekey |= (u64) clutaddr << 32; } + int w = 1 << (gstate.texsize[0] & 0xf); + int h = 1 << ((gstate.texsize[0]>>8) & 0xf); + // Check for FBO - slow! TexCacheEntry *fboEntry = GetEntryAt(texaddr); if (fboEntry && fboEntry->fbo) { fbo_bind_color_as_texture(fboEntry->fbo, 0); UpdateSamplingParams(*fboEntry, false); + + int fbow, fboh; + fbo_get_dimensions(fboEntry->fbo, &fbow, &fboh); + + gstate_c.curTextureWidth = w / fbow; // except not - + gstate_c.curTextureHeight = h / fboh; return; } @@ -742,9 +751,6 @@ void TextureCache::SetTexture() { entry.dim = gstate.texsize[0] & 0xF0F; - int w = 1 << (gstate.texsize[0] & 0xf); - int h = 1 << ((gstate.texsize[0]>>8) & 0xf); - // This would overestimate the size in many case so we underestimate instead // to avoid excessive clearing caused by cache invalidations. entry.sizeInRAM = (bitsPerPixel[format < 11 ? format : 0] * bufw * h / 2) / 8; diff --git a/native b/native index 09950112d3..f22ad17d40 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 09950112d3bd60fbfbd877446d5dfe5117b8b9e1 +Subproject commit f22ad17d40c00d9a60bd21f53820012b302d7559