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:
gdkchan 2023-01-21 21:07:43 -03:00 committed by GitHub
parent 7b7f62c776
commit 7fea26e97e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
89 changed files with 192 additions and 281 deletions

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureCopyToCommand : IGALCommand
struct TextureCopyToCommand : IGALCommand, IGALCommand<TextureCopyToCommand>
{
public CommandType CommandType => CommandType.TextureCopyTo;
private TableRef<ThreadedTexture> _texture;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureCopyToScaledCommand : IGALCommand
struct TextureCopyToScaledCommand : IGALCommand, IGALCommand<TextureCopyToScaledCommand>
{
public CommandType CommandType => CommandType.TextureCopyToScaled;
private TableRef<ThreadedTexture> _texture;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureCopyToSliceCommand : IGALCommand
struct TextureCopyToSliceCommand : IGALCommand, IGALCommand<TextureCopyToSliceCommand>
{
public CommandType CommandType => CommandType.TextureCopyToSlice;
private TableRef<ThreadedTexture> _texture;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureCreateViewCommand : IGALCommand
struct TextureCreateViewCommand : IGALCommand, IGALCommand<TextureCreateViewCommand>
{
public CommandType CommandType => CommandType.TextureCreateView;
private TableRef<ThreadedTexture> _texture;

View file

@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureGetDataCommand : IGALCommand
struct TextureGetDataCommand : IGALCommand, IGALCommand<TextureGetDataCommand>
{
public CommandType CommandType => CommandType.TextureGetData;
private TableRef<ThreadedTexture> _texture;

View file

@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureGetDataSliceCommand : IGALCommand
struct TextureGetDataSliceCommand : IGALCommand, IGALCommand<TextureGetDataSliceCommand>
{
public CommandType CommandType => CommandType.TextureGetDataSlice;
private TableRef<ThreadedTexture> _texture;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureReleaseCommand : IGALCommand
struct TextureReleaseCommand : IGALCommand, IGALCommand<TextureReleaseCommand>
{
public CommandType CommandType => CommandType.TextureRelease;
private TableRef<ThreadedTexture> _texture;

View file

@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureSetDataCommand : IGALCommand
struct TextureSetDataCommand : IGALCommand, IGALCommand<TextureSetDataCommand>
{
public CommandType CommandType => CommandType.TextureSetData;
private TableRef<ThreadedTexture> _texture;

View file

@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureSetDataSliceCommand : IGALCommand
struct TextureSetDataSliceCommand : IGALCommand, IGALCommand<TextureSetDataSliceCommand>
{
public CommandType CommandType => CommandType.TextureSetDataSlice;
private TableRef<ThreadedTexture> _texture;

View file

@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureSetDataSliceRegionCommand : IGALCommand
struct TextureSetDataSliceRegionCommand : IGALCommand, IGALCommand<TextureSetDataSliceRegionCommand>
{
public CommandType CommandType => CommandType.TextureSetDataSliceRegion;
private TableRef<ThreadedTexture> _texture;

View file

@ -3,7 +3,7 @@ using Ryujinx.Graphics.GAL.Multithreading.Resources;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
{
struct TextureSetStorageCommand : IGALCommand
struct TextureSetStorageCommand : IGALCommand, IGALCommand<TextureSetStorageCommand>
{
public CommandType CommandType => CommandType.TextureSetStorage;
private TableRef<ThreadedTexture> _texture;