From 17a1cab5d29787f3b41f40a69b530dae4e3cb25f Mon Sep 17 00:00:00 2001 From: gdkchan 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.Shader/Translation/Rewriter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Ryujinx.Graphics.Shader/Translation') diff --git a/Ryujinx.Graphics.Shader/Translation/Rewriter.cs b/Ryujinx.Graphics.Shader/Translation/Rewriter.cs index 640717f9..bdd9b791 100644 --- a/Ryujinx.Graphics.Shader/Translation/Rewriter.cs +++ b/Ryujinx.Graphics.Shader/Translation/Rewriter.cs @@ -14,6 +14,7 @@ namespace Ryujinx.Graphics.Shader.Translation { bool isVertexShader = config.Stage == ShaderStage.Vertex; bool hasConstantBufferDrawParameters = config.GpuAccessor.QueryHasConstantBufferDrawParameters(); + bool supportsSnormBufferTextureFormat = config.GpuAccessor.QueryHostSupportsSnormBufferTextureFormat(); for (int blkIndex = 0; blkIndex < blocks.Length; blkIndex++) { @@ -52,7 +53,7 @@ namespace Ryujinx.Graphics.Shader.Translation { node = RewriteTextureSample(node, config); - if (texOp.Type == SamplerType.TextureBuffer) + if (texOp.Type == SamplerType.TextureBuffer && !supportsSnormBufferTextureFormat) { node = InsertSnormNormalization(node, config); } -- cgit v1.2.3