From c25fffc9a064851bd93c4b82fdd25e41a4975961 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 10 Jan 2018 14:56:18 +0100 Subject: Treat custom textures with "_arb" suffix as having arbitrary mipmaps This is adapted from Bighead's code that was posted at https://forums.dolphin-emu.org/Thread-dolphin-custom-texture-mipmaps?pid=460867#pid460867 In master, custom textures are never treated as having arbitrary mipmaps, so we need either a change like this or a change that makes us apply the arbitrary mipmap heuristic even when a custom texture is used. --- Source/Core/VideoCommon/TextureCacheBase.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp') diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 36e1328a92..444076aad4 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -718,9 +718,8 @@ TextureCacheBase::GetTexture(u32 address, u32 width, u32 height, const TextureFo return nullptr; } - // If we are recording a FifoLog, keep track of what memory we read. - // FifiRecorder does it's own memory modification tracking independant of the texture hashing - // below. + // If we are recording a FifoLog, keep track of what memory we read. FifoRecorder does + // its own memory modification tracking independent of the texture hashing below. if (g_bRecordFifoData && !from_tmem) FifoRecorder::GetInstance().UseMemory(address, texture_size + additional_mips_size, MemoryUpdate::TEXTURE_MAP); @@ -1088,7 +1087,8 @@ TextureCacheBase::GetTexture(u32 address, u32 width, u32 height, const TextureFo } } - entry->has_arbitrary_mips = arbitrary_mip_detector.HasArbitraryMipmaps(dst_buffer); + entry->has_arbitrary_mips = hires_tex ? hires_tex->HasArbitraryMipmaps() : + arbitrary_mip_detector.HasArbitraryMipmaps(dst_buffer); if (g_ActiveConfig.bDumpTextures && !hires_tex) { -- cgit v1.2.3