From eb8132b627d3c0285dd199f4e40c6f3800bdb22d Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 17 Sep 2024 15:52:30 -0300 Subject: Change image format view handling to allow view incompatible formats (#7311) * Allow creating texture aliases on texture pool * Delete old image format override code * New format incompatible alias * Missing bounds check * GetForBinding now takes FormatInfo * Make FormatInfo struct more compact --- src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Ryujinx.HLE') diff --git a/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs b/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs index fd517b1a..4c17e7ae 100644 --- a/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs +++ b/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs @@ -412,9 +412,9 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger Format format = ConvertColorFormat(item.GraphicBuffer.Object.Buffer.Surfaces[0].ColorFormat); - int bytesPerPixel = + byte bytesPerPixel = format == Format.B5G6R5Unorm || - format == Format.R4G4B4A4Unorm ? 2 : 4; + format == Format.R4G4B4A4Unorm ? (byte)2 : (byte)4; int gobBlocksInY = 1 << item.GraphicBuffer.Object.Buffer.Surfaces[0].BlockHeightLog2; -- cgit v1.2.3