mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-26 09:41:11 +00:00
Invalidate texture cache when the STC or native mipmaps options are changed.
Fixes minor graphical glitches in these cases. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6677 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
9bf2705c2d
commit
7de6773483
@ -950,6 +950,11 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
|
|||||||
DLCache::ProgressiveCleanup();
|
DLCache::ProgressiveCleanup();
|
||||||
TextureCache::Cleanup();
|
TextureCache::Cleanup();
|
||||||
|
|
||||||
|
// reload textures if these settings changed
|
||||||
|
if (g_Config.bSafeTextureCache != g_ActiveConfig.bSafeTextureCache ||
|
||||||
|
g_Config.bUseNativeMips != g_ActiveConfig.bUseNativeMips)
|
||||||
|
TextureCache::Invalidate(false);
|
||||||
|
|
||||||
// Enable any configuration changes
|
// Enable any configuration changes
|
||||||
UpdateActiveConfig();
|
UpdateActiveConfig();
|
||||||
const bool WindowResized = CheckForResize();
|
const bool WindowResized = CheckForResize();
|
||||||
|
@ -870,7 +870,7 @@ void Renderer::SetBlendMode(bool forceUpdate)
|
|||||||
{
|
{
|
||||||
if (bpmem.blendmode.logicopenable && !forceUpdate)
|
if (bpmem.blendmode.logicopenable && !forceUpdate)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (bpmem.blendmode.subtract && bpmem.blendmode.blendenable)
|
if (bpmem.blendmode.subtract && bpmem.blendmode.blendenable)
|
||||||
{
|
{
|
||||||
D3D::SetRenderState(D3DRS_ALPHABLENDENABLE, true);
|
D3D::SetRenderState(D3DRS_ALPHABLENDENABLE, true);
|
||||||
@ -1159,6 +1159,11 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
|
|||||||
DLCache::ProgressiveCleanup();
|
DLCache::ProgressiveCleanup();
|
||||||
TextureCache::Cleanup();
|
TextureCache::Cleanup();
|
||||||
|
|
||||||
|
// reload textures if these settings changed
|
||||||
|
if (g_Config.bSafeTextureCache != g_ActiveConfig.bSafeTextureCache ||
|
||||||
|
g_Config.bUseNativeMips != g_ActiveConfig.bUseNativeMips)
|
||||||
|
TextureCache::Invalidate(false);
|
||||||
|
|
||||||
// Enable any configuration changes
|
// Enable any configuration changes
|
||||||
UpdateActiveConfig();
|
UpdateActiveConfig();
|
||||||
const bool WindowResized = CheckForResize();
|
const bool WindowResized = CheckForResize();
|
||||||
|
@ -1350,11 +1350,16 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
|
|||||||
GL_REPORT_ERRORD();
|
GL_REPORT_ERRORD();
|
||||||
g_Config.iSaveTargetId = 0;
|
g_Config.iSaveTargetId = 0;
|
||||||
|
|
||||||
bool last_copy_efb_to_Texture = g_ActiveConfig.bCopyEFBToTexture;
|
// reload textures if these settings changed
|
||||||
UpdateActiveConfig();
|
if (g_Config.bSafeTextureCache != g_ActiveConfig.bSafeTextureCache ||
|
||||||
if (last_copy_efb_to_Texture != g_ActiveConfig.bCopyEFBToTexture)
|
g_Config.bUseNativeMips != g_ActiveConfig.bUseNativeMips)
|
||||||
|
TextureCache::Invalidate(false);
|
||||||
|
|
||||||
|
if (g_Config.bCopyEFBToTexture != g_ActiveConfig.bCopyEFBToTexture)
|
||||||
TextureCache::ClearRenderTargets();
|
TextureCache::ClearRenderTargets();
|
||||||
|
|
||||||
|
UpdateActiveConfig();
|
||||||
|
|
||||||
// For testing zbuffer targets.
|
// For testing zbuffer targets.
|
||||||
// Renderer::SetZBufferRender();
|
// Renderer::SetZBufferRender();
|
||||||
// SaveTexture("tex.tga", GL_TEXTURE_RECTANGLE_ARB, s_FakeZTarget,
|
// SaveTexture("tex.tga", GL_TEXTURE_RECTANGLE_ARB, s_FakeZTarget,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user