From a16f201a6f7bd06a3a366b622a6d6c91895e2984 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Fri, 6 Nov 2020 17:45:30 +0000 Subject: [PATCH] Do not align sizes for buffer texture targets. (#1671) This should fix a random crash in Hyrule Warriors, and potentially other games that use buffer textures. --- Ryujinx.Graphics.Gpu/Image/TextureCompatibility.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Ryujinx.Graphics.Gpu/Image/TextureCompatibility.cs b/Ryujinx.Graphics.Gpu/Image/TextureCompatibility.cs index 6b85e49a..2507519b 100644 --- a/Ryujinx.Graphics.Gpu/Image/TextureCompatibility.cs +++ b/Ryujinx.Graphics.Gpu/Image/TextureCompatibility.cs @@ -274,7 +274,9 @@ namespace Ryujinx.Graphics.Gpu.Image return false; } - if (alignSizes) + bool isTextureBuffer = lhs.Target == Target.TextureBuffer || rhs.Target == Target.TextureBuffer; + + if (alignSizes && !isTextureBuffer) { Size size0 = GetAlignedSize(lhs); Size size1 = GetAlignedSize(rhs);