aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs')
-rw-r--r--src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs37
1 files changed, 1 insertions, 36 deletions
diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs
index 01d8a6e7..b2577a99 100644
--- a/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs
+++ b/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs
@@ -68,7 +68,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
string args = string.Empty;
- if (atomic && operation.StorageKind == StorageKind.StorageBuffer)
+ if (atomic && (operation.StorageKind == StorageKind.StorageBuffer || operation.StorageKind == StorageKind.SharedMemory))
{
args = GenerateLoadOrStore(context, operation, isStore: false);
@@ -81,23 +81,6 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
args += ", " + GetSoureExpr(context, operation.GetSource(argIndex), dstType);
}
}
- else if (atomic && operation.StorageKind == StorageKind.SharedMemory)
- {
- args = LoadShared(context, operation);
-
- // For shared memory access, the second argument is unused and should be ignored.
- // It is there to make both storage and shared access have the same number of arguments.
- // For storage, both inputs are consumed when the argument index is 0, so we should skip it here.
-
- for (int argIndex = 2; argIndex < arity; argIndex++)
- {
- args += ", ";
-
- AggregateType dstType = GetSrcVarType(inst, argIndex);
-
- args += GetSoureExpr(context, operation.GetSource(argIndex), dstType);
- }
- }
else
{
for (int argIndex = 0; argIndex < arity; argIndex++)
@@ -179,12 +162,6 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
case Instruction.Load:
return Load(context, operation);
- case Instruction.LoadLocal:
- return LoadLocal(context, operation);
-
- case Instruction.LoadShared:
- return LoadShared(context, operation);
-
case Instruction.Lod:
return Lod(context, operation);
@@ -200,18 +177,6 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
case Instruction.Store:
return Store(context, operation);
- case Instruction.StoreLocal:
- return StoreLocal(context, operation);
-
- case Instruction.StoreShared:
- return StoreShared(context, operation);
-
- case Instruction.StoreShared16:
- return StoreShared16(context, operation);
-
- case Instruction.StoreShared8:
- return StoreShared8(context, operation);
-
case Instruction.TextureSample:
return TextureSample(context, operation);