aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL/Multithreading/Commands/Shader/ShaderDisposeCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.GAL/Multithreading/Commands/Shader/ShaderDisposeCommand.cs')
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/Shader/ShaderDisposeCommand.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/Shader/ShaderDisposeCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/Shader/ShaderDisposeCommand.cs
new file mode 100644
index 00000000..ebb2c927
--- /dev/null
+++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/Shader/ShaderDisposeCommand.cs
@@ -0,0 +1,21 @@
+using Ryujinx.Graphics.GAL.Multithreading.Model;
+using Ryujinx.Graphics.GAL.Multithreading.Resources;
+
+namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Shader
+{
+ struct ShaderDisposeCommand : IGALCommand
+ {
+ public CommandType CommandType => CommandType.ShaderDispose;
+ private TableRef<ThreadedShader> _shader;
+
+ public void Set(TableRef<ThreadedShader> shader)
+ {
+ _shader = shader;
+ }
+
+ public static void Run(ref ShaderDisposeCommand command, ThreadedRenderer threaded, IRenderer renderer)
+ {
+ command._shader.Get(threaded).Base.Dispose();
+ }
+ }
+}