diff options
Diffstat (limited to 'Ryujinx.Graphics.GAL/Multithreading')
4 files changed, 26 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs b/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs index 48873491..063b7edf 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs @@ -98,6 +98,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading Register<EndHostConditionalRenderingCommand>(CommandType.EndHostConditionalRendering); Register<EndTransformFeedbackCommand>(CommandType.EndTransformFeedback); Register<SetAlphaTestCommand>(CommandType.SetAlphaTest); + Register<SetBlendStateAdvancedCommand>(CommandType.SetBlendStateAdvanced); Register<SetBlendStateCommand>(CommandType.SetBlendState); Register<SetDepthBiasCommand>(CommandType.SetDepthBias); Register<SetDepthClampCommand>(CommandType.SetDepthClamp); diff --git a/Ryujinx.Graphics.GAL/Multithreading/CommandType.cs b/Ryujinx.Graphics.GAL/Multithreading/CommandType.cs index c199ff34..61e729b4 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/CommandType.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/CommandType.cs @@ -60,6 +60,7 @@ EndHostConditionalRendering, EndTransformFeedback, SetAlphaTest, + SetBlendStateAdvanced, SetBlendState, SetDepthBias, SetDepthClamp, diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/SetBlendStateAdvancedCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/SetBlendStateAdvancedCommand.cs new file mode 100644 index 00000000..2ec10a50 --- /dev/null +++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/SetBlendStateAdvancedCommand.cs @@ -0,0 +1,18 @@ +namespace Ryujinx.Graphics.GAL.Multithreading.Commands +{ + struct SetBlendStateAdvancedCommand : IGALCommand, IGALCommand<SetBlendStateAdvancedCommand> + { + public CommandType CommandType => CommandType.SetBlendStateAdvanced; + private AdvancedBlendDescriptor _blend; + + public void Set(AdvancedBlendDescriptor blend) + { + _blend = blend; + } + + public static void Run(ref SetBlendStateAdvancedCommand command, ThreadedRenderer threaded, IRenderer renderer) + { + renderer.Pipeline.SetBlendState(command._blend); + } + } +} diff --git a/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs b/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs index ba120867..1bdc9cf4 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs @@ -131,6 +131,12 @@ namespace Ryujinx.Graphics.GAL.Multithreading _renderer.QueueCommand(); } + public void SetBlendState(AdvancedBlendDescriptor blend) + { + _renderer.New<SetBlendStateAdvancedCommand>().Set(blend); + _renderer.QueueCommand(); + } + public void SetBlendState(int index, BlendDescriptor blend) { _renderer.New<SetBlendStateCommand>().Set(index, blend); |