mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-21 10:09:59 -04:00
Import the base tree (MIT, see LICENSE)
This commit is contained in:
46
tools/vendor/ryujinx/src/Ryujinx.Graphics.Shader/Instructions/InstEmitBarrier.cs
vendored
Normal file
46
tools/vendor/ryujinx/src/Ryujinx.Graphics.Shader/Instructions/InstEmitBarrier.cs
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
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)
|
||||
{
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
InstDepbar op = context.GetOp<InstDepbar>();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
// No operation.
|
||||
}
|
||||
|
||||
public static void Membar(EmitterContext context)
|
||||
{
|
||||
InstMembar op = context.GetOp<InstMembar>();
|
||||
|
||||
if (op.Membar == Decoders.Membar.Cta)
|
||||
{
|
||||
context.GroupMemoryBarrier();
|
||||
}
|
||||
else
|
||||
{
|
||||
context.MemoryBarrier();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user