From aa1cd849cfe254dc7c8c9a0783a546a4b9b3c0ab Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 12 Oct 2018 22:37:01 -0300 Subject: Quads, QuadStrip, const attributes and half-float attributes support (#447) * Quads, QuadStrip and const attributes support * Add support for half float attributes and fix texture pitch alignment * Throw when an unsupported float type is used as const attribute aswell --- Ryujinx.Graphics/Texture/ImageUtils.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Ryujinx.Graphics/Texture/ImageUtils.cs') diff --git a/Ryujinx.Graphics/Texture/ImageUtils.cs b/Ryujinx.Graphics/Texture/ImageUtils.cs index 18a179fb..1b043245 100644 --- a/Ryujinx.Graphics/Texture/ImageUtils.cs +++ b/Ryujinx.Graphics/Texture/ImageUtils.cs @@ -289,7 +289,11 @@ namespace Ryujinx.Graphics.Texture { ImageDescriptor Desc = GetImageDescriptor(Format); - return Desc.BytesPerPixel * DivRoundUp(Width, Desc.BlockWidth); + int Pitch = Desc.BytesPerPixel * DivRoundUp(Width, Desc.BlockWidth); + + Pitch = (Pitch + 0x1f) & ~0x1f; + + return Pitch; } public static int GetBlockWidth(GalImageFormat Format) -- cgit v1.2.3