Add support for advanced blend (part 1/2) (#2801)
* Add blend microcode registers * Add advanced blend support using host extension * Remove debug message * Use pre-generated table for blend functions * XML docs * Rename AdvancedBlendMode to AdvancedBlendOp for consistency * Remove redundant code * Fix some advanced blend related issues on Vulkan * Formatting
This commit is contained in:
parent
6bf460e104
commit
7aa430f1a5
27 changed files with 5605 additions and 14 deletions
|
@ -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);
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
EndHostConditionalRendering,
|
||||
EndTransformFeedback,
|
||||
SetAlphaTest,
|
||||
SetBlendStateAdvanced,
|
||||
SetBlendState,
|
||||
SetDepthBias,
|
||||
SetDepthClamp,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue