summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/Render.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/OGL/Render.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/Render.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp
index b3535709f2..ccf89b45f2 100644
--- a/Source/Core/VideoBackends/OGL/Render.cpp
+++ b/Source/Core/VideoBackends/OGL/Render.cpp
@@ -1503,9 +1503,13 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
g_Config.iSaveTargetId = 0;
+ int old_anisotropy = g_ActiveConfig.iMaxAnisotropy;
UpdateActiveConfig();
g_texture_cache->OnConfigChanged(g_ActiveConfig);
+ if (old_anisotropy != g_ActiveConfig.iMaxAnisotropy)
+ g_sampler_cache->Clear();
+
// Invalidate shader cache when the host config changes.
if (CheckForHostConfigChanges())
ProgramShaderCache::Reload();
@@ -1834,13 +1838,9 @@ void Renderer::SetDepthState(const DepthState& state)
}
}
-void Renderer::SetSamplerState(int stage, int texindex, bool custom_tex)
+void Renderer::SetSamplerState(u32 index, const SamplerState& state)
{
- auto const& tex = bpmem.tex[texindex];
- auto const& tm0 = tex.texMode0[stage];
- auto const& tm1 = tex.texMode1[stage];
-
- g_sampler_cache->SetSamplerState((texindex * 4) + stage, tm0, tm1, custom_tex);
+ g_sampler_cache->SetSamplerState(index, state);
}
void Renderer::SetInterlacingMode()