Check texture format changes even for renders.

This commit is contained in:
Unknown W. Brackets 2013-09-06 23:40:23 -07:00
parent f1eb152913
commit 37c7b1a5c1
2 changed files with 6 additions and 6 deletions

View File

@ -491,7 +491,7 @@ void FramebufferManager::SetRenderFrameBuffer() {
VirtualFramebuffer *vfb = 0;
for (size_t i = 0; i < vfbs_.size(); ++i) {
VirtualFramebuffer *v = vfbs_[i];
if (MaskedEqual(v->fb_address, fb_address) && (g_Config.bTrueColor || v->format == fmt)) {
if (MaskedEqual(v->fb_address, fb_address) && v->format == fmt) {
// Let's not be so picky for now. Let's say this is the one.
vfb = v;
// Update fb stride in case it changed

View File

@ -1064,18 +1064,18 @@ void TextureCache::SetTexture() {
if (iter != cache.end()) {
entry = &iter->second;
// Validate the texture still matches the cache entry.
int dim = gstate.texsize[0] & 0xF0F;
bool match = entry->Matches(dim, format, maxLevel);
// Check for FBO - slow!
if (entry->framebuffer) {
if (entry->framebuffer && match) {
SetTextureFramebuffer(entry);
lastBoundTexture = -1;
entry->lastFrame = gpuStats.numFlips;
return;
}
// Validate the texture here (width, height etc)
int dim = gstate.texsize[0] & 0xF0F;
bool match = entry->Matches(dim, format, maxLevel);
bool rehash = (entry->status & TexCacheEntry::STATUS_MASK) == TexCacheEntry::STATUS_UNRELIABLE;
bool doDelete = true;