From fce4695f064224378739ca0db7c734089653d53b Mon Sep 17 00:00:00 2001 From: R2DLiu Date: Sun, 16 Aug 2020 13:56:47 -0400 Subject: [PATCH] fix accidentally broken scaling --- Source/Core/VideoCommon/TextureCacheBase.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index d8cf88b045..db1e28210d 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -1777,12 +1777,15 @@ TextureCacheBase::GetXFBTexture(u32 address, u32 width, u32 height, u32 stride, return nullptr; } + u32 scaled_tex_w = g_renderer->EFBToScaledX(width); + u32 scaled_tex_h = g_renderer->EFBToScaledY(height); + // Compute total texture size. XFB textures aren't tiled, so this is simple. const u32 total_size = height * stride; const u64 hash = Common::GetHash64(src_data, total_size, 0); TCacheEntry* entry = nullptr; - const TextureConfig config(width, height, 1, g_framebuffer_manager->GetEFBLayers(), + const TextureConfig config(scaled_tex_w, scaled_tex_h, 1, g_framebuffer_manager->GetEFBLayers(), 1, AbstractTextureFormat::RGBA8, AbstractTextureFlag_RenderTarget); entry = AllocateCacheEntry(config);