mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-03-17 20:11:06 +00:00
45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using Ryujinx.Graphics.Shader.Decoders;
|
|
using Ryujinx.Graphics.Shader.Translation;
|
|
|
|
namespace Ryujinx.Graphics.Shader.Instructions
|
|
{
|
|
static partial class InstEmit
|
|
{
|
|
public static void Bar(EmitterContext context)
|
|
{
|
|
InstBar op = context.GetOp<InstBar>();
|
|
|
|
// TODO: Support other modes.
|
|
if (op.BarOp == BarOp.Sync)
|
|
{
|
|
context.Barrier();
|
|
}
|
|
else
|
|
{
|
|
context.TranslatorContext.GpuAccessor.Log($"Invalid barrier mode: {op.BarOp}.");
|
|
}
|
|
}
|
|
|
|
public static void Depbar(EmitterContext context)
|
|
{
|
|
_ = context.GetOp<InstDepbar>();
|
|
|
|
// No operation.
|
|
}
|
|
|
|
public static void Membar(EmitterContext context)
|
|
{
|
|
InstMembar op = context.GetOp<InstMembar>();
|
|
|
|
if (op.Membar == Decoders.Membar.Cta)
|
|
{
|
|
context.GroupMemoryBarrier();
|
|
}
|
|
else
|
|
{
|
|
context.MemoryBarrier();
|
|
}
|
|
}
|
|
}
|
|
}
|