Add support for alpha to coverage dithering (#3069)
* Add support for alpha to coverage dithering * Shader cache version bump * Fix wrong alpha register * Ensure support buffer is cleared * New shader specialization based approach
This commit is contained in:
parent
594246ea47
commit
b46b63e06a
20 changed files with 217 additions and 34 deletions
|
@ -179,6 +179,8 @@ namespace Ryujinx.Graphics.GAL.Multithreading
|
|||
SetLineParametersCommand.Run(ref GetCommand<SetLineParametersCommand>(memory), threaded, renderer);
|
||||
_lookup[(int)CommandType.SetLogicOpState] = (Span<byte> memory, ThreadedRenderer threaded, IRenderer renderer) =>
|
||||
SetLogicOpStateCommand.Run(ref GetCommand<SetLogicOpStateCommand>(memory), threaded, renderer);
|
||||
_lookup[(int)CommandType.SetMultisampleState] = (Span<byte> memory, ThreadedRenderer threaded, IRenderer renderer) =>
|
||||
SetMultisampleStateCommand.Run(ref GetCommand<SetMultisampleStateCommand>(memory), threaded, renderer);
|
||||
_lookup[(int)CommandType.SetPatchParameters] = (Span<byte> memory, ThreadedRenderer threaded, IRenderer renderer) =>
|
||||
SetPatchParametersCommand.Run(ref GetCommand<SetPatchParametersCommand>(memory), threaded, renderer);
|
||||
_lookup[(int)CommandType.SetPointParameters] = (Span<byte> memory, ThreadedRenderer threaded, IRenderer renderer) =>
|
||||
|
|
|
@ -71,6 +71,7 @@
|
|||
SetIndexBuffer,
|
||||
SetLineParameters,
|
||||
SetLogicOpState,
|
||||
SetMultisampleState,
|
||||
SetPatchParameters,
|
||||
SetPointParameters,
|
||||
SetPolygonMode,
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
||||
{
|
||||
struct SetMultisampleStateCommand : IGALCommand
|
||||
{
|
||||
public CommandType CommandType => CommandType.SetMultisampleState;
|
||||
private MultisampleDescriptor _multisample;
|
||||
|
||||
public void Set(MultisampleDescriptor multisample)
|
||||
{
|
||||
_multisample = multisample;
|
||||
}
|
||||
|
||||
public static void Run(ref SetMultisampleStateCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
||||
{
|
||||
renderer.Pipeline.SetMultisampleState(command._multisample);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -184,6 +184,12 @@ namespace Ryujinx.Graphics.GAL.Multithreading
|
|||
_renderer.QueueCommand();
|
||||
}
|
||||
|
||||
public void SetMultisampleState(MultisampleDescriptor multisample)
|
||||
{
|
||||
_renderer.New<SetMultisampleStateCommand>().Set(multisample);
|
||||
_renderer.QueueCommand();
|
||||
}
|
||||
|
||||
public void SetPatchParameters(int vertices, ReadOnlySpan<float> defaultOuterLevel, ReadOnlySpan<float> defaultInnerLevel)
|
||||
{
|
||||
_renderer.New<SetPatchParametersCommand>().Set(vertices, defaultOuterLevel, defaultInnerLevel);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue