aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Translation/Rewriter.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-12-04 15:36:03 -0300
committerGitHub <noreply@github.com>2022-12-04 15:36:03 -0300
commit17a1cab5d29787f3b41f40a69b530dae4e3cb25f (patch)
tree25f72e40e08c851b80dea2ee2e184ddb3ba1d479 /Ryujinx.Graphics.Shader/Translation/Rewriter.cs
parent73aed239c356c4c573819eb6ee1e2d414d2d5579 (diff)
Allow SNorm buffer texture formats on Vulkan (#3957)1.1.421
* Allow SNorm buffer texture formats on Vulkan * Shader cache version bump
Diffstat (limited to 'Ryujinx.Graphics.Shader/Translation/Rewriter.cs')
-rw-r--r--Ryujinx.Graphics.Shader/Translation/Rewriter.cs3
1 files changed, 2 insertions, 1 deletions
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);
}