From 88633f4bc2987c3118c4d0f482870b7871b47e81 Mon Sep 17 00:00:00 2001
From: riperiperi <rhy3756547@hotmail.com>
Date: Fri, 27 Nov 2020 18:23:30 +0000
Subject: [PATCH] Blacklist very textures with a very small width or height
 from scaling (#1753)

---
 Ryujinx.Graphics.Gpu/Image/TextureManager.cs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
index 8e64ca61f8..0834d7acc9 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
@@ -408,6 +408,12 @@ namespace Ryujinx.Graphics.Gpu.Image
                 return false;
             }
 
+            if (info.Width < 8 || info.Height < 8)
+            {
+                // Discount textures with small dimensions.
+                return false;
+            }
+
             if (!(info.FormatInfo.Format.IsDepthOrStencil() || info.FormatInfo.Components == 1))
             {
                 // Discount square textures that aren't depth-stencil like. (excludes game textures, cubemap faces, most 3D texture LUT, texture atlas)