From bc19114bb5a14f4563aa4bee68bda97234a7bcb0 Mon Sep 17 00:00:00 2001 From: sharmander Date: Mon, 31 Aug 2020 20:06:27 -0400 Subject: Fix: Issue #1475 Texture Compatibility Check methods need to be centralized (#1482) * Texture Compatibility Check methods need to be centralized #1475 * Fix spacing * Fix spacing * Undo removal of .ToString() * Move isPerfectMatch back to Texture.cs Rename parameters in TextureCompatibility.cs for consistency * Add switch from 1474 to TextureCompatibility as requested by mageven. * Actually add TextureCompatibility changes to the PR (Add DeriveDepthFormat method) * Alignment corrections + Derive method signature adjustment. * Removed empty line as erquested * Remove empty lines * Remove blank lines, fix alignment * Fix alignment * Remove emtpy line --- Ryujinx.Graphics.Gpu/Image/TextureManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Image/TextureManager.cs') diff --git a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs index c69f69c6..cab76da1 100644 --- a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs +++ b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs @@ -634,7 +634,7 @@ namespace Ryujinx.Graphics.Gpu.Image // deletion. _cache.Lift(overlap); } - else if (!overlap.SizeMatches(info)) + else if (!TextureCompatibility.SizeMatches(overlap.Info, info)) { // If this is used for sampling, the size must match, // otherwise the shader would sample garbage data. @@ -707,7 +707,7 @@ namespace Ryujinx.Graphics.Gpu.Image // The size only matters (and is only really reliable) when the // texture is used on a sampler, because otherwise the size will be // aligned. - if (!overlap.SizeMatches(info, firstLevel) && isSamplerTexture) + if (!TextureCompatibility.SizeMatches(overlap.Info, info, firstLevel) && isSamplerTexture) { texture.ChangeSize(info.Width, info.Height, info.DepthOrLayers); } -- cgit v1.2.3