From c92ec2081175d206863227ec5719afcd29ae0d52 Mon Sep 17 00:00:00 2001 From: Julian Date: Fri, 16 Dec 2016 22:53:55 +0200 Subject: [PATCH] Fixed Inconsistent texture filtering in Disgaea 2 #4235 --- Core/TextureReplacer.cpp | 2 +- GPU/Directx9/TextureCacheDX9.cpp | 2 +- GPU/GLES/TextureCache.cpp | 3 ++- GPU/Vulkan/TextureCacheVulkan.cpp | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/TextureReplacer.cpp b/Core/TextureReplacer.cpp index 3e06c73c69..c359ceab73 100644 --- a/Core/TextureReplacer.cpp +++ b/Core/TextureReplacer.cpp @@ -294,7 +294,7 @@ void TextureReplacer::NotifyTextureDecoded(const ReplacedTextureDecodeInfo &repl // Ignore. return; } - if (replacedInfo.addr > 0x05000000 && replacedInfo.addr < 0x08800000) { + if (replacedInfo.addr > 0x05000000 && replacedInfo.addr < PSP_GetKernelMemoryEnd()) { // Don't save the PPGe texture. return; } diff --git a/GPU/Directx9/TextureCacheDX9.cpp b/GPU/Directx9/TextureCacheDX9.cpp index c2fce59411..fa7e12cea7 100644 --- a/GPU/Directx9/TextureCacheDX9.cpp +++ b/GPU/Directx9/TextureCacheDX9.cpp @@ -1235,7 +1235,7 @@ void TextureCacheDX9::BuildTexture(TexCacheEntry *const entry, bool replaceImage } // Don't scale the PPGe texture. - if (entry->addr > 0x05000000 && entry->addr < 0x08800000) + if (entry->addr > 0x05000000 && entry->addr < PSP_GetKernelMemoryEnd()) scaleFactor = 1; if ((entry->status & TexCacheEntry::STATUS_CHANGE_FREQUENT) != 0 && scaleFactor != 1) { // Remember for later that we /wanted/ to scale this texture. diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index 3f775beb40..3bddffd487 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -1342,8 +1342,9 @@ void TextureCache::BuildTexture(TexCacheEntry *const entry, bool replaceImages) } // Don't scale the PPGe texture. - if (entry->addr > 0x05000000 && entry->addr < 0x08800000) + if (entry->addr > 0x05000000 && entry->addr < PSP_GetKernelMemoryEnd()) scaleFactor = 1; + if ((entry->status & TexCacheEntry::STATUS_CHANGE_FREQUENT) != 0 && scaleFactor != 1) { // Remember for later that we /wanted/ to scale this texture. entry->status |= TexCacheEntry::STATUS_TO_SCALE; diff --git a/GPU/Vulkan/TextureCacheVulkan.cpp b/GPU/Vulkan/TextureCacheVulkan.cpp index cef1ba5680..01766547f8 100644 --- a/GPU/Vulkan/TextureCacheVulkan.cpp +++ b/GPU/Vulkan/TextureCacheVulkan.cpp @@ -1257,7 +1257,7 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry, VulkanPushBuff } // Don't scale the PPGe texture. - if (entry->addr > 0x05000000 && entry->addr < 0x08800000) + if (entry->addr > 0x05000000 && entry->addr < PSP_GetKernelMemoryEnd()) scaleFactor = 1; if ((entry->status & TexCacheEntry::STATUS_CHANGE_FREQUENT) != 0 && scaleFactor != 1) { // Remember for later that we /wanted/ to scale this texture.