mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-16 22:06:36 +00:00
Some more small changes
This commit is contained in:
parent
ab7f379e11
commit
863674768d
@ -899,7 +899,9 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
public void SetDepthMode(DepthMode mode)
|
||||
{
|
||||
bool oldMode;
|
||||
if (Gd.ExtendedDynamicState3Features.ExtendedDynamicState3DepthClipNegativeOneToOne)
|
||||
bool supportsDepthClipandDynamicState = Gd.Capabilities.SupportsDepthClipControl &&
|
||||
Gd.ExtendedDynamicState3Features.ExtendedDynamicState3DepthClipNegativeOneToOne;
|
||||
if (supportsDepthClipandDynamicState)
|
||||
{
|
||||
oldMode = DynamicState.DepthMode;
|
||||
DynamicState.SetDepthMode(mode == DepthMode.MinusOneToOne);
|
||||
@ -910,7 +912,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
_newState.DepthMode = mode == DepthMode.MinusOneToOne;
|
||||
}
|
||||
|
||||
if ((Gd.ExtendedDynamicState3Features.ExtendedDynamicState3DepthClipNegativeOneToOne ? DynamicState.DepthMode : _newState.DepthMode) != oldMode)
|
||||
if ((supportsDepthClipandDynamicState ? DynamicState.DepthMode : _newState.DepthMode) != oldMode)
|
||||
{
|
||||
SignalStateChange();
|
||||
}
|
||||
|
@ -508,18 +508,14 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
viewportState.ScissorCount = ScissorsCount;
|
||||
}
|
||||
|
||||
if (gd.Capabilities.SupportsDepthClipControl)
|
||||
if (gd.Capabilities.SupportsDepthClipControl && !gd.ExtendedDynamicState3Features.ExtendedDynamicState3DepthClipNegativeOneToOne)
|
||||
{
|
||||
var viewportDepthClipControlState = new PipelineViewportDepthClipControlCreateInfoEXT
|
||||
{
|
||||
SType = StructureType.PipelineViewportDepthClipControlCreateInfoExt,
|
||||
NegativeOneToOne = DepthMode,
|
||||
};
|
||||
|
||||
if (!gd.ExtendedDynamicState3Features.ExtendedDynamicState3DepthClipNegativeOneToOne)
|
||||
{
|
||||
viewportDepthClipControlState.NegativeOneToOne = DepthMode;
|
||||
}
|
||||
|
||||
viewportState.PNext = &viewportDepthClipControlState;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user