Add a pass to turn global memory access into storage access, and do all storage related transformations on IR
This commit is contained in:
parent
396768f3b4
commit
6a98c643ca
28 changed files with 532 additions and 282 deletions
|
@ -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}\".");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue