Consolodate barriers
This commit is contained in:
parent
a31e461db8
commit
558752594c
3 changed files with 6 additions and 15 deletions
|
@ -1,8 +1,5 @@
|
|||
using Ryujinx.Graphics.Shader.IntermediateRepresentation;
|
||||
using Ryujinx.Graphics.Shader.StructuredIr;
|
||||
using Ryujinx.Graphics.Shader.Translation;
|
||||
|
||||
using static Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions.InstGenHelper;
|
||||
using static Ryujinx.Graphics.Shader.StructuredIr.InstructionInfo;
|
||||
|
||||
namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
||||
{
|
||||
|
@ -10,7 +7,9 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
|||
{
|
||||
public static string Barrier(CodeGenContext context, AstOperation operation)
|
||||
{
|
||||
return "threadgroup_barrier(mem_flags::mem_threadgroup)";
|
||||
var device = (operation.Inst & Instruction.Mask) == Instruction.MemoryBarrier;
|
||||
|
||||
return $"threadgroup_barrier(mem_flags::mem_{(device ? "device" : "threadgroup")})";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue