Browse Source

Prefer texture over textureSize for sampler type (#3132)

* Prefer texture over textureSize for sampler type

* Shader cache version bump
gdkchan 4 years ago
parent
commit
72e543e946

+ 1 - 1
Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs

@@ -40,7 +40,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
         /// <summary>
         /// <summary>
         /// Version of the codegen (to be changed when codegen or guest format change).
         /// Version of the codegen (to be changed when codegen or guest format change).
         /// </summary>
         /// </summary>
-        private const ulong ShaderCodeGenVersion = 3063;
+        private const ulong ShaderCodeGenVersion = 3132;
 
 
         // Progress reporting helpers
         // Progress reporting helpers
         private volatile int _shaderCount;
         private volatile int _shaderCount;

+ 1 - 1
Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs

@@ -369,7 +369,7 @@ namespace Ryujinx.Graphics.Shader.Translation
             inst &= Instruction.Mask;
             inst &= Instruction.Mask;
             bool isImage = inst == Instruction.ImageLoad || inst == Instruction.ImageStore || inst == Instruction.ImageAtomic;
             bool isImage = inst == Instruction.ImageLoad || inst == Instruction.ImageStore || inst == Instruction.ImageAtomic;
             bool isWrite = inst == Instruction.ImageStore || inst == Instruction.ImageAtomic;
             bool isWrite = inst == Instruction.ImageStore || inst == Instruction.ImageAtomic;
-            bool accurateType = inst != Instruction.Lod;
+            bool accurateType = inst != Instruction.Lod && inst != Instruction.TextureSize;
             bool coherent = flags.HasFlag(TextureFlags.Coherent);
             bool coherent = flags.HasFlag(TextureFlags.Coherent);
 
 
             if (isImage)
             if (isImage)