summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexManagerBase.cpp
diff options
context:
space:
mode:
authormagumagu <magumagu9@gmail.com>2015-01-26 15:33:23 -0800
committermagumagu <magumagu9@gmail.com>2015-02-19 15:09:27 -0800
commitc0a4760f0efbb99274c33f30154a7f43aab70494 (patch)
tree43f5702f9719d895a1637da55798145e38cfb7fe /Source/Core/VideoCommon/VertexManagerBase.cpp
parentfbbbad98e93a0437c5124283cbf877f32eeceb86 (diff)
Decode EFB copies used as paletted textures.
A number of games make an EFB copy in I4/I8 format, then use it as a texture in C4/C8 format. Detect when this happens, and decode the copy on the GPU using the specified palette. This has a few advantages: it allows using EFB2Tex for a few more games, it, it preserves the resolution of scaled EFB copies, and it's probably a bit faster. D3D only at the moment, but porting to OpenGL should be straightforward..
Diffstat (limited to 'Source/Core/VideoCommon/VertexManagerBase.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexManagerBase.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp
index 2ebb42122f..bf7800cc9a 100644
--- a/Source/Core/VideoCommon/VertexManagerBase.cpp
+++ b/Source/Core/VideoCommon/VertexManagerBase.cpp
@@ -209,6 +209,7 @@ void VertexManager::Flush()
if (bpmem.tevind[i].IsActive() && bpmem.tevind[i].bt < bpmem.genMode.numindstages)
usedtextures[bpmem.tevindref.getTexMap(bpmem.tevind[i].bt)] = true;
+ TextureCache::UnbindTextures();
for (unsigned int i : usedtextures)
{
g_renderer->SetSamplerState(i & 3, i >> 2);
@@ -224,6 +225,7 @@ void VertexManager::Flush()
ERROR_LOG(VIDEO, "error loading texture");
}
}
+ TextureCache::BindTextures();
}
// set global vertex constants