Rewrite shader decoding stage (#2698)
* Rewrite shader decoding stage * Fix P2R constant buffer encoding * Fix PSET/PSETP * PR feedback * Log unimplemented shader instructions * Implement NOP * Remove using * PR feedback
This commit is contained in:
parent
0510fde25a
commit
a7109c767b
168 changed files with 12022 additions and 6388 deletions
44
Ryujinx.Graphics.Shader/Instructions/InstEmitBarrier.cs
Normal file
44
Ryujinx.Graphics.Shader/Instructions/InstEmitBarrier.cs
Normal file
|
@ -0,0 +1,44 @@
|
|||
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.Config.GpuAccessor.Log($"Invalid barrier mode: {op.BarOp}.");
|
||||
}
|
||||
}
|
||||
|
||||
public static void Depbar(EmitterContext context)
|
||||
{
|
||||
InstDepbar op = 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue