diff options
Diffstat (limited to 'Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs')
| -rw-r--r-- | Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs index ec7e8982..2314016e 100644 --- a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs +++ b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs @@ -315,15 +315,16 @@ namespace Ryujinx.Graphics.Shader.Translation bool isImage = inst == Instruction.ImageLoad || inst == Instruction.ImageStore || inst == Instruction.ImageAtomic; bool isWrite = inst == Instruction.ImageStore || inst == Instruction.ImageAtomic; bool accurateType = inst != Instruction.Lod; + bool coherent = flags.HasFlag(TextureFlags.Coherent); if (isImage) { - SetUsedTextureOrImage(_usedImages, cbufSlot, handle, type, format, true, isWrite, false); + SetUsedTextureOrImage(_usedImages, cbufSlot, handle, type, format, true, isWrite, false, coherent); } else { bool intCoords = flags.HasFlag(TextureFlags.IntCoords) || inst == Instruction.TextureSize; - SetUsedTextureOrImage(_usedTextures, cbufSlot, handle, type, TextureFormat.Unknown, intCoords, false, accurateType); + SetUsedTextureOrImage(_usedTextures, cbufSlot, handle, type, TextureFormat.Unknown, intCoords, false, accurateType, coherent); } } @@ -335,7 +336,8 @@ namespace Ryujinx.Graphics.Shader.Translation TextureFormat format, bool intCoords, bool write, - bool accurateType) + bool accurateType, + bool coherent) { var dimensions = type.GetDimensions(); var isIndexed = type.HasFlag(SamplerType.Indexed); @@ -361,6 +363,11 @@ namespace Ryujinx.Graphics.Shader.Translation usageFlags |= TextureUsageFlags.ImageStore; } + if (coherent) + { + usageFlags |= TextureUsageFlags.ImageCoherent; + } + int arraySize = isIndexed ? SamplerArraySize : 1; for (int layer = 0; layer < arraySize; layer++) |
