mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2025-02-18 13:28:16 -06:00

* Introduce new IGALCommand<T> interface and use it * Remove use of reflection on GAL multithreading * Unmanaged constraint
26 lines
969 B
C#
26 lines
969 B
C#
using Ryujinx.Graphics.GAL.Multithreading.Model;
|
|
using Ryujinx.Graphics.GAL.Multithreading.Resources;
|
|
|
|
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
|
{
|
|
struct TryHostConditionalRenderingCommand : IGALCommand, IGALCommand<TryHostConditionalRenderingCommand>
|
|
{
|
|
public CommandType CommandType => CommandType.TryHostConditionalRendering;
|
|
private TableRef<ThreadedCounterEvent> _value;
|
|
private ulong _compare;
|
|
private bool _isEqual;
|
|
|
|
public void Set(TableRef<ThreadedCounterEvent> value, ulong compare, bool isEqual)
|
|
{
|
|
_value = value;
|
|
_compare = compare;
|
|
_isEqual = isEqual;
|
|
}
|
|
|
|
public static void Run(ref TryHostConditionalRenderingCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
|
{
|
|
renderer.Pipeline.TryHostConditionalRendering(command._value.Get(threaded)?.Base, command._compare, command._isEqual);
|
|
}
|
|
}
|
|
}
|