mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-27 11:03:04 +00:00
Enable Alpha Test workaround on Metal
This commit is contained in:
parent
b7ddb693bc
commit
05189c7749
2 changed files with 7 additions and 5 deletions
|
@ -16,7 +16,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
|||
private readonly GpuAccessorState _state;
|
||||
private readonly int _stageIndex;
|
||||
private readonly bool _compute;
|
||||
private readonly bool _isVulkan;
|
||||
private readonly bool _isOpenGL;
|
||||
private readonly bool _hasGeometryShader;
|
||||
private readonly bool _supportsQuads;
|
||||
|
||||
|
@ -38,7 +38,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
|||
_channel = channel;
|
||||
_state = state;
|
||||
_stageIndex = stageIndex;
|
||||
_isVulkan = context.Capabilities.Api == TargetApi.Vulkan;
|
||||
_isOpenGL = context.Capabilities.Api == TargetApi.OpenGL;
|
||||
_hasGeometryShader = hasGeometryShader;
|
||||
_supportsQuads = context.Capabilities.SupportsQuads;
|
||||
|
||||
|
@ -116,10 +116,10 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
|||
public GpuGraphicsState QueryGraphicsState()
|
||||
{
|
||||
return _state.GraphicsState.CreateShaderGraphicsState(
|
||||
!_isVulkan,
|
||||
_isOpenGL,
|
||||
_supportsQuads,
|
||||
_hasGeometryShader,
|
||||
_isVulkan || _state.GraphicsState.YNegateEnabled);
|
||||
!_isOpenGL || _state.GraphicsState.YNegateEnabled);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
|
|
@ -428,7 +428,9 @@ namespace Ryujinx.Graphics.Metal
|
|||
|
||||
public void SetAlphaTest(bool enable, float reference, CompareOp op)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Gpu, "Not Implemented!");
|
||||
// This is currently handled using shader specialization, as Metal does not support alpha test.
|
||||
// In the future, we may want to use this to write the reference value into the support buffer,
|
||||
// to avoid creating one version of the shader per reference value used.
|
||||
}
|
||||
|
||||
public void SetBlendState(AdvancedBlendDescriptor blend)
|
||||
|
|
Loading…
Reference in a new issue