summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorNeoBrainX <NeoBrainX@gmail.com>2013-06-17 12:05:47 +0200
committerNeoBrainX <NeoBrainX@gmail.com>2013-06-17 12:05:47 +0200
commitca22872daed7c384db350b2987b21ea92299a9e8 (patch)
tree21414cf12a5eb7a2b3cc4e0b1702aabf4c7c8890 /Source/Core/VideoCommon/Src/TextureCacheBase.cpp
parentf0ea525d3b4dea15363674c822943ecf38da26b3 (diff)
parent43a4d418896f47ea971ccd83d5630a97f0f0000b (diff)
Merge 'master' into shader-uids-awesome.
Conflicts: Source/Core/VideoCommon/Src/LightingShaderGen.cpp Source/Core/VideoCommon/Src/PixelShaderGen.cpp Source/Core/VideoCommon/Src/PixelShaderGen.h Source/Core/VideoCommon/Src/VertexShaderGen.cpp
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/TextureCacheBase.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
index d5d21f89d0..7d5b9354ad 100644
--- a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
@@ -32,6 +32,7 @@ TextureCache::TexCache TextureCache::textures;
TextureCache::BackupConfig TextureCache::backup_config;
+bool invalidate_texture_cache_requested;
TextureCache::TCacheEntryBase::~TCacheEntryBase()
{
@@ -49,6 +50,13 @@ TextureCache::TextureCache()
HiresTextures::Init(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str());
SetHash64Function(g_ActiveConfig.bHiresTextures || g_ActiveConfig.bDumpTextures);
+
+ invalidate_texture_cache_requested = false;
+}
+
+void TextureCache::RequestInvalidateTextureCache()
+{
+ invalidate_texture_cache_requested = true;
}
void TextureCache::Invalidate()
@@ -80,7 +88,8 @@ void TextureCache::OnConfigChanged(VideoConfig& config)
if (config.iSafeTextureCache_ColorSamples != backup_config.s_colorsamples ||
config.bTexFmtOverlayEnable != backup_config.s_texfmt_overlay ||
config.bTexFmtOverlayCenter != backup_config.s_texfmt_overlay_center ||
- config.bHiresTextures != backup_config.s_hires_textures)
+ config.bHiresTextures != backup_config.s_hires_textures ||
+ invalidate_texture_cache_requested)
{
g_texture_cache->Invalidate();
@@ -89,6 +98,8 @@ void TextureCache::OnConfigChanged(VideoConfig& config)
SetHash64Function(g_ActiveConfig.bHiresTextures || g_ActiveConfig.bDumpTextures);
TexDecoder_SetTexFmtOverlayOptions(g_ActiveConfig.bTexFmtOverlayEnable, g_ActiveConfig.bTexFmtOverlayCenter);
+
+ invalidate_texture_cache_requested = false;
}
// TODO: Probably shouldn't clear all render targets here, just mark them dirty or something.