From 17a1cab5d29787f3b41f40a69b530dae4e3cb25f Mon Sep 17 00:00:00 2001 From: gdkchan <gab.dark.100@gmail.com> Date: Sun, 4 Dec 2022 15:36:03 -0300 Subject: Allow SNorm buffer texture formats on Vulkan (#3957) * Allow SNorm buffer texture formats on Vulkan * Shader cache version bump --- Ryujinx.Graphics.Gpu/Image/TextureCache.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Image/TextureCache.cs') diff --git a/Ryujinx.Graphics.Gpu/Image/TextureCache.cs b/Ryujinx.Graphics.Gpu/Image/TextureCache.cs index d76879eb..a6bb5741 100644 --- a/Ryujinx.Graphics.Gpu/Image/TextureCache.cs +++ b/Ryujinx.Graphics.Gpu/Image/TextureCache.cs @@ -1088,10 +1088,9 @@ namespace Ryujinx.Graphics.Gpu.Image { FormatInfo formatInfo = TextureCompatibility.ToHostCompatibleFormat(info, caps); - if (info.Target == Target.TextureBuffer) + if (info.Target == Target.TextureBuffer && !caps.SupportsSnormBufferTextureFormat) { - // We assume that the host does not support signed normalized format - // (as is the case with OpenGL), so we just use a unsigned format. + // If the host does not support signed normalized formats, we use a signed integer format instead. // The shader will need the appropriate conversion code to compensate. switch (formatInfo.Format) { -- cgit v1.2.3-70-g09d2