rasterizer_cache: Make cache reset on resolution/filter change more explicit
This commit is contained in:
parent
14aea56fa1
commit
cc5a88a864
|
@ -584,10 +584,12 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces(
|
||||||
const auto& regs = Pica::g_state.regs;
|
const auto& regs = Pica::g_state.regs;
|
||||||
const auto& config = regs.framebuffer.framebuffer;
|
const auto& config = regs.framebuffer.framebuffer;
|
||||||
|
|
||||||
// update resolution_scale_factor and reset cache if changed
|
// Update resolution_scale_factor and reset cache if changed
|
||||||
if ((resolution_scale_factor != VideoCore::GetResolutionScaleFactor()) ||
|
const bool resolution_scale_changed = resolution_scale_factor != VideoCore::GetResolutionScaleFactor();
|
||||||
(VideoCore::g_texture_filter_update_requested.exchange(false) &&
|
const bool texture_filter_changed = VideoCore::g_texture_filter_update_requested.exchange(false)
|
||||||
texture_filterer->Reset(Settings::values.texture_filter_name, resolution_scale_factor))) {
|
&& texture_filterer->Reset(Settings::values.texture_filter_name, VideoCore::GetResolutionScaleFactor());
|
||||||
|
|
||||||
|
if (resolution_scale_changed || texture_filter_changed) {
|
||||||
resolution_scale_factor = VideoCore::GetResolutionScaleFactor();
|
resolution_scale_factor = VideoCore::GetResolutionScaleFactor();
|
||||||
FlushAll();
|
FlushAll();
|
||||||
while (!surface_cache.empty())
|
while (!surface_cache.empty())
|
||||||
|
|
Reference in New Issue