mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-03-12 18:14:25 +00:00
16 lines
505 B
C#
16 lines
505 B
C#
using Ryujinx.Graphics.Shader.IntermediateRepresentation;
|
|
using Ryujinx.Graphics.Shader.StructuredIr;
|
|
|
|
namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
|
{
|
|
static class InstGenBarrier
|
|
{
|
|
public static string Barrier(CodeGenContext context, AstOperation operation)
|
|
{
|
|
bool device = (operation.Inst & Instruction.Mask) == Instruction.MemoryBarrier;
|
|
|
|
return $"threadgroup_barrier(mem_flags::mem_{(device ? "device" : "threadgroup")})";
|
|
}
|
|
}
|
|
}
|