aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Translation/GlobalMemory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Shader/Translation/GlobalMemory.cs')
-rw-r--r--Ryujinx.Graphics.Shader/Translation/GlobalMemory.cs9
1 files changed, 2 insertions, 7 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/GlobalMemory.cs b/Ryujinx.Graphics.Shader/Translation/GlobalMemory.cs
index 3915c0d5..774a128d 100644
--- a/Ryujinx.Graphics.Shader/Translation/GlobalMemory.cs
+++ b/Ryujinx.Graphics.Shader/Translation/GlobalMemory.cs
@@ -16,20 +16,15 @@ namespace Ryujinx.Graphics.Shader.Translation
public const int UbeDescsSize = StorageDescSize * UbeMaxCount;
public const int UbeFirstCbuf = 8;
- public static bool UsesGlobalMemory(Instruction inst)
+ public static bool UsesGlobalMemory(Instruction inst, StorageKind storageKind)
{
- return (inst.IsAtomic() && IsGlobalMr(inst)) ||
+ return (inst.IsAtomic() && storageKind == StorageKind.GlobalMemory) ||
inst == Instruction.LoadGlobal ||
inst == Instruction.StoreGlobal ||
inst == Instruction.StoreGlobal16 ||
inst == Instruction.StoreGlobal8;
}
- private static bool IsGlobalMr(Instruction inst)
- {
- return (inst & Instruction.MrMask) == Instruction.MrGlobal;
- }
-
public static int GetStorageCbOffset(ShaderStage stage, int slot)
{
return GetStorageBaseCbOffset(stage) + slot * StorageDescSize;