aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture
diff options
context:
space:
mode:
authorTSR Berry <20988865+TSRBerry@users.noreply.github.com>2023-04-08 01:22:00 +0200
committerMary <thog@protonmail.com>2023-04-27 23:51:14 +0200
commitcee712105850ac3385cd0091a923438167433f9f (patch)
tree4a5274b21d8b7f938c0d0ce18736d3f2993b11b1 /Ryujinx.Graphics.GAL/Multithreading/Commands/Texture
parentcd124bda587ef09668a971fa1cac1c3f0cfc9f21 (diff)
Move solution and projects to src
Diffstat (limited to 'Ryujinx.Graphics.GAL/Multithreading/Commands/Texture')
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToCommand.cs28
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToScaledCommand.cs30
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToSliceCommand.cs32
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCreateViewCommand.cs30
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataCommand.cs26
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataSliceCommand.cs30
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureReleaseCommand.cs21
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataCommand.cs25
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceCommand.cs29
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceRegionCommand.cs31
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetStorageCommand.cs23
11 files changed, 0 insertions, 305 deletions
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToCommand.cs
deleted file mode 100644
index 02d0b639..00000000
--- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToCommand.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using Ryujinx.Graphics.GAL.Multithreading.Model;
-using Ryujinx.Graphics.GAL.Multithreading.Resources;
-
-namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
-{
- struct TextureCopyToCommand : IGALCommand, IGALCommand<TextureCopyToCommand>
- {
- public CommandType CommandType => CommandType.TextureCopyTo;
- private TableRef<ThreadedTexture> _texture;
- private TableRef<ThreadedTexture> _destination;
- private int _firstLayer;
- private int _firstLevel;
-
- public void Set(TableRef<ThreadedTexture> texture, TableRef<ThreadedTexture> destination, int firstLayer, int firstLevel)
- {
- _texture = texture;
- _destination = destination;
- _firstLayer = firstLayer;
- _firstLevel = firstLevel;
- }
-
- public static void Run(ref TextureCopyToCommand command, ThreadedRenderer threaded, IRenderer renderer)
- {
- ThreadedTexture source = command._texture.Get(threaded);
- source.Base.CopyTo(command._destination.Get(threaded).Base, command._firstLayer, command._firstLevel);
- }
- }
-}
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToScaledCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToScaledCommand.cs
deleted file mode 100644
index 6b83d3f8..00000000
--- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToScaledCommand.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using Ryujinx.Graphics.GAL.Multithreading.Model;
-using Ryujinx.Graphics.GAL.Multithreading.Resources;
-
-namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
-{
- struct TextureCopyToScaledCommand : IGALCommand, IGALCommand<TextureCopyToScaledCommand>
- {
- public CommandType CommandType => CommandType.TextureCopyToScaled;
- private TableRef<ThreadedTexture> _texture;
- private TableRef<ThreadedTexture> _destination;
- private Extents2D _srcRegion;
- private Extents2D _dstRegion;
- private bool _linearFilter;
-
- public void Set(TableRef<ThreadedTexture> texture, TableRef<ThreadedTexture> destination, Extents2D srcRegion, Extents2D dstRegion, bool linearFilter)
- {
- _texture = texture;
- _destination = destination;
- _srcRegion = srcRegion;
- _dstRegion = dstRegion;
- _linearFilter = linearFilter;
- }
-
- public static void Run(ref TextureCopyToScaledCommand command, ThreadedRenderer threaded, IRenderer renderer)
- {
- ThreadedTexture source = command._texture.Get(threaded);
- source.Base.CopyTo(command._destination.Get(threaded).Base, command._srcRegion, command._dstRegion, command._linearFilter);
- }
- }
-}
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToSliceCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToSliceCommand.cs
deleted file mode 100644
index 2a340a70..00000000
--- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCopyToSliceCommand.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using Ryujinx.Graphics.GAL.Multithreading.Model;
-using Ryujinx.Graphics.GAL.Multithreading.Resources;
-
-namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
-{
- struct TextureCopyToSliceCommand : IGALCommand, IGALCommand<TextureCopyToSliceCommand>
- {
- public CommandType CommandType => CommandType.TextureCopyToSlice;
- private TableRef<ThreadedTexture> _texture;
- private TableRef<ThreadedTexture> _destination;
- private int _srcLayer;
- private int _dstLayer;
- private int _srcLevel;
- private int _dstLevel;
-
- public void Set(TableRef<ThreadedTexture> texture, TableRef<ThreadedTexture> destination, int srcLayer, int dstLayer, int srcLevel, int dstLevel)
- {
- _texture = texture;
- _destination = destination;
- _srcLayer = srcLayer;
- _dstLayer = dstLayer;
- _srcLevel = srcLevel;
- _dstLevel = dstLevel;
- }
-
- public static void Run(ref TextureCopyToSliceCommand command, ThreadedRenderer threaded, IRenderer renderer)
- {
- ThreadedTexture source = command._texture.Get(threaded);
- source.Base.CopyTo(command._destination.Get(threaded).Base, command._srcLayer, command._dstLayer, command._srcLevel, command._dstLevel);
- }
- }
-}
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCreateViewCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCreateViewCommand.cs
deleted file mode 100644
index 09e9ca2f..00000000
--- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureCreateViewCommand.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using Ryujinx.Graphics.GAL.Multithreading.Model;
-using Ryujinx.Graphics.GAL.Multithreading.Resources;
-
-namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
-{
- struct TextureCreateViewCommand : IGALCommand, IGALCommand<TextureCreateViewCommand>
- {
- public CommandType CommandType => CommandType.TextureCreateView;
- private TableRef<ThreadedTexture> _texture;
- private TableRef<ThreadedTexture> _destination;
- private TextureCreateInfo _info;
- private int _firstLayer;
- private int _firstLevel;
-
- public void Set(TableRef<ThreadedTexture> texture, TableRef<ThreadedTexture> destination, TextureCreateInfo info, int firstLayer, int firstLevel)
- {
- _texture = texture;
- _destination = destination;
- _info = info;
- _firstLayer = firstLayer;
- _firstLevel = firstLevel;
- }
-
- public static void Run(ref TextureCreateViewCommand command, ThreadedRenderer threaded, IRenderer renderer)
- {
- ThreadedTexture source = command._texture.Get(threaded);
- command._destination.Get(threaded).Base = source.Base.CreateView(command._info, command._firstLayer, command._firstLevel);
- }
- }
-}
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataCommand.cs
deleted file mode 100644
index 91320d45..00000000
--- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataCommand.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using Ryujinx.Graphics.GAL.Multithreading.Model;
-using Ryujinx.Graphics.GAL.Multithreading.Resources;
-using System;
-
-namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
-{
- struct TextureGetDataCommand : IGALCommand, IGALCommand<TextureGetDataCommand>
- {
- public CommandType CommandType => CommandType.TextureGetData;
- private TableRef<ThreadedTexture> _texture;
- private TableRef<ResultBox<PinnedSpan<byte>>> _result;
-
- public void Set(TableRef<ThreadedTexture> texture, TableRef<ResultBox<PinnedSpan<byte>>> result)
- {
- _texture = texture;
- _result = result;
- }
-
- public static void Run(ref TextureGetDataCommand command, ThreadedRenderer threaded, IRenderer renderer)
- {
- PinnedSpan<byte> result = command._texture.Get(threaded).Base.GetData();
-
- command._result.Get(threaded).Result = result;
- }
- }
-}
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataSliceCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataSliceCommand.cs
deleted file mode 100644
index ec06cc4d..00000000
--- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureGetDataSliceCommand.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using Ryujinx.Graphics.GAL.Multithreading.Model;
-using Ryujinx.Graphics.GAL.Multithreading.Resources;
-using System;
-
-namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
-{
- struct TextureGetDataSliceCommand : IGALCommand, IGALCommand<TextureGetDataSliceCommand>
- {
- public CommandType CommandType => CommandType.TextureGetDataSlice;
- private TableRef<ThreadedTexture> _texture;
- private TableRef<ResultBox<PinnedSpan<byte>>> _result;
- private int _layer;
- private int _level;
-
- public void Set(TableRef<ThreadedTexture> texture, TableRef<ResultBox<PinnedSpan<byte>>> result, int layer, int level)
- {
- _texture = texture;
- _result = result;
- _layer = layer;
- _level = level;
- }
-
- public static void Run(ref TextureGetDataSliceCommand command, ThreadedRenderer threaded, IRenderer renderer)
- {
- PinnedSpan<byte> result = command._texture.Get(threaded).Base.GetData(command._layer, command._level);
-
- command._result.Get(threaded).Result = result;
- }
- }
-}
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureReleaseCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureReleaseCommand.cs
deleted file mode 100644
index 61486e09..00000000
--- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureReleaseCommand.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using Ryujinx.Graphics.GAL.Multithreading.Model;
-using Ryujinx.Graphics.GAL.Multithreading.Resources;
-
-namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
-{
- struct TextureReleaseCommand : IGALCommand, IGALCommand<TextureReleaseCommand>
- {
- public CommandType CommandType => CommandType.TextureRelease;
- private TableRef<ThreadedTexture> _texture;
-
- public void Set(TableRef<ThreadedTexture> texture)
- {
- _texture = texture;
- }
-
- public static void Run(ref TextureReleaseCommand command, ThreadedRenderer threaded, IRenderer renderer)
- {
- command._texture.Get(threaded).Base.Release();
- }
- }
-}
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataCommand.cs
deleted file mode 100644
index cfbaffd3..00000000
--- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataCommand.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using Ryujinx.Graphics.GAL.Multithreading.Model;
-using Ryujinx.Graphics.GAL.Multithreading.Resources;
-using System;
-
-namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
-{
- struct TextureSetDataCommand : IGALCommand, IGALCommand<TextureSetDataCommand>
- {
- public CommandType CommandType => CommandType.TextureSetData;
- private TableRef<ThreadedTexture> _texture;
- private TableRef<byte[]> _data;
-
- public void Set(TableRef<ThreadedTexture> texture, TableRef<byte[]> data)
- {
- _texture = texture;
- _data = data;
- }
-
- public static void Run(ref TextureSetDataCommand command, ThreadedRenderer threaded, IRenderer renderer)
- {
- ThreadedTexture texture = command._texture.Get(threaded);
- texture.Base.SetData(new ReadOnlySpan<byte>(command._data.Get(threaded)));
- }
- }
-}
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceCommand.cs
deleted file mode 100644
index a7126f61..00000000
--- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceCommand.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using Ryujinx.Graphics.GAL.Multithreading.Model;
-using Ryujinx.Graphics.GAL.Multithreading.Resources;
-using System;
-
-namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
-{
- struct TextureSetDataSliceCommand : IGALCommand, IGALCommand<TextureSetDataSliceCommand>
- {
- public CommandType CommandType => CommandType.TextureSetDataSlice;
- private TableRef<ThreadedTexture> _texture;
- private TableRef<byte[]> _data;
- private int _layer;
- private int _level;
-
- public void Set(TableRef<ThreadedTexture> texture, TableRef<byte[]> data, int layer, int level)
- {
- _texture = texture;
- _data = data;
- _layer = layer;
- _level = level;
- }
-
- public static void Run(ref TextureSetDataSliceCommand command, ThreadedRenderer threaded, IRenderer renderer)
- {
- ThreadedTexture texture = command._texture.Get(threaded);
- texture.Base.SetData(new ReadOnlySpan<byte>(command._data.Get(threaded)), command._layer, command._level);
- }
- }
-}
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceRegionCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceRegionCommand.cs
deleted file mode 100644
index 4df83e08..00000000
--- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetDataSliceRegionCommand.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using Ryujinx.Graphics.GAL.Multithreading.Model;
-using Ryujinx.Graphics.GAL.Multithreading.Resources;
-using System;
-
-namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
-{
- struct TextureSetDataSliceRegionCommand : IGALCommand, IGALCommand<TextureSetDataSliceRegionCommand>
- {
- public CommandType CommandType => CommandType.TextureSetDataSliceRegion;
- private TableRef<ThreadedTexture> _texture;
- private TableRef<byte[]> _data;
- private int _layer;
- private int _level;
- private Rectangle<int> _region;
-
- public void Set(TableRef<ThreadedTexture> texture, TableRef<byte[]> data, int layer, int level, Rectangle<int> region)
- {
- _texture = texture;
- _data = data;
- _layer = layer;
- _level = level;
- _region = region;
- }
-
- public static void Run(ref TextureSetDataSliceRegionCommand command, ThreadedRenderer threaded, IRenderer renderer)
- {
- ThreadedTexture texture = command._texture.Get(threaded);
- texture.Base.SetData(new ReadOnlySpan<byte>(command._data.Get(threaded)), command._layer, command._level, command._region);
- }
- }
-}
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetStorageCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetStorageCommand.cs
deleted file mode 100644
index 2a1943a9..00000000
--- a/Ryujinx.Graphics.GAL/Multithreading/Commands/Texture/TextureSetStorageCommand.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using Ryujinx.Graphics.GAL.Multithreading.Model;
-using Ryujinx.Graphics.GAL.Multithreading.Resources;
-
-namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
-{
- struct TextureSetStorageCommand : IGALCommand, IGALCommand<TextureSetStorageCommand>
- {
- public CommandType CommandType => CommandType.TextureSetStorage;
- private TableRef<ThreadedTexture> _texture;
- private BufferRange _storage;
-
- public void Set(TableRef<ThreadedTexture> texture, BufferRange storage)
- {
- _texture = texture;
- _storage = storage;
- }
-
- public static void Run(ref TextureSetStorageCommand command, ThreadedRenderer threaded, IRenderer renderer)
- {
- command._texture.Get(threaded).Base.SetStorage(threaded.Buffers.MapBufferRange(command._storage));
- }
- }
-}