Evan Husted 80d619f010 Revert "Revert the Metal Experiment (#701)"
This reverts commit fe1617ffeae0edd58bf61b1e008304e1221a1f7d.
2025-02-22 21:33:38 -06:00

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")})";
}
}
}