Remove use of reflection on GAL multithreading (#4287)
* Introduce new IGALCommand<T> interface and use it * Remove use of reflection on GAL multithreading * Unmanaged constraint
This commit is contained in:
parent
7b7f62c776
commit
7fea26e97e
89 changed files with 192 additions and 281 deletions
|
@ -3,7 +3,7 @@ using System;
|
|||
|
||||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||
{
|
||||
struct ActionCommand : IGALCommand
|
||||
struct ActionCommand : IGALCommand, IGALCommand<ActionCommand>
|
||||
{
|
||||
public CommandType CommandType => CommandType.Action;
|
||||
private TableRef<Action> _action;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||
{
|
||||
struct CreateBufferCommand : IGALCommand
|
||||
struct CreateBufferCommand : IGALCommand, IGALCommand<CreateBufferCommand>
|
||||
{
|
||||
public CommandType CommandType => CommandType.CreateBuffer;
|
||||
private BufferHandle _threadedHandle;
|
||||
|
|
|
@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources.Programs;
|
|||
|
||||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||
{
|
||||
struct CreateProgramCommand : IGALCommand
|
||||
struct CreateProgramCommand : IGALCommand, IGALCommand<CreateProgramCommand>
|
||||
{
|
||||
public CommandType CommandType => CommandType.CreateProgram;
|
||||
private TableRef<IProgramRequest> _request;
|
||||
|
|
|
@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
|
|||
|
||||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||
{
|
||||
struct CreateSamplerCommand : IGALCommand
|
||||
struct CreateSamplerCommand : IGALCommand, IGALCommand<CreateSamplerCommand>
|
||||
{
|
||||
public CommandType CommandType => CommandType.CreateSampler;
|
||||
private TableRef<ThreadedSampler> _sampler;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||
{
|
||||
struct CreateSyncCommand : IGALCommand
|
||||
struct CreateSyncCommand : IGALCommand, IGALCommand<CreateSyncCommand>
|
||||
{
|
||||
public CommandType CommandType => CommandType.CreateSync;
|
||||
private ulong _id;
|
||||
|
|
|
@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
|
|||
|
||||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||
{
|
||||
struct CreateTextureCommand : IGALCommand
|
||||
struct CreateTextureCommand : IGALCommand, IGALCommand<CreateTextureCommand>
|
||||
{
|
||||
public CommandType CommandType => CommandType.CreateTexture;
|
||||
private TableRef<ThreadedTexture> _texture;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||
{
|
||||
struct GetCapabilitiesCommand : IGALCommand
|
||||
struct GetCapabilitiesCommand : IGALCommand, IGALCommand<GetCapabilitiesCommand>
|
||||
{
|
||||
public CommandType CommandType => CommandType.GetCapabilities;
|
||||
private TableRef<ResultBox<Capabilities>> _result;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||
{
|
||||
struct PreFrameCommand : IGALCommand
|
||||
struct PreFrameCommand : IGALCommand, IGALCommand<PreFrameCommand>
|
||||
{
|
||||
public CommandType CommandType => CommandType.PreFrame;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ using System;
|
|||
|
||||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||
{
|
||||
struct ReportCounterCommand : IGALCommand
|
||||
struct ReportCounterCommand : IGALCommand, IGALCommand<ReportCounterCommand>
|
||||
{
|
||||
public CommandType CommandType => CommandType.ReportCounter;
|
||||
private TableRef<ThreadedCounterEvent> _event;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||
{
|
||||
struct ResetCounterCommand : IGALCommand
|
||||
struct ResetCounterCommand : IGALCommand, IGALCommand<ResetCounterCommand>
|
||||
{
|
||||
public CommandType CommandType => CommandType.ResetCounter;
|
||||
private CounterType _type;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
|
||||
{
|
||||
struct UpdateCountersCommand : IGALCommand
|
||||
struct UpdateCountersCommand : IGALCommand, IGALCommand<UpdateCountersCommand>
|
||||
{
|
||||
public CommandType CommandType => CommandType.UpdateCounters;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue