mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-08-11 14:32:32 -07:00
Add a pass to turn global memory access into storage access, and do all storage related transformations on IR
This commit is contained in:
@@ -49,12 +49,18 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
|
||||
|
||||
if (argIndex == 0 && atomic)
|
||||
{
|
||||
switch (inst & Instruction.MrMask)
|
||||
Instruction memRegion = inst & Instruction.MrMask;
|
||||
|
||||
switch (memRegion)
|
||||
{
|
||||
// TODO: Global.
|
||||
case Instruction.MrShared: args += LoadShared (context, operation); break;
|
||||
case Instruction.MrStorage: args += LoadStorage(context, operation); break;
|
||||
|
||||
default: throw new InvalidOperationException($"Invalid memory region \"{memRegion}\".");
|
||||
}
|
||||
|
||||
// We use the first 2 operands above.
|
||||
argIndex++;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -150,8 +156,6 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
|
||||
}
|
||||
}
|
||||
|
||||
return "0";
|
||||
|
||||
throw new InvalidOperationException($"Unexpected instruction type \"{info.Type}\".");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user