aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Vulkan/PipelineState.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Vulkan/PipelineState.cs')
-rw-r--r--src/Ryujinx.Graphics.Vulkan/PipelineState.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineState.cs b/src/Ryujinx.Graphics.Vulkan/PipelineState.cs
index a3d8dd6f..aff3f13f 100644
--- a/src/Ryujinx.Graphics.Vulkan/PipelineState.cs
+++ b/src/Ryujinx.Graphics.Vulkan/PipelineState.cs
@@ -304,6 +304,12 @@ namespace Ryujinx.Graphics.Vulkan
set => Internal.Id9 = (Internal.Id9 & 0xFFFFFFFFFFFFFFCF) | ((ulong)value << 4);
}
+ public bool DepthMode
+ {
+ get => ((Internal.Id9 >> 6) & 0x1) != 0UL;
+ set => Internal.Id9 = (Internal.Id9 & 0xFFFFFFFFFFFFFFBF) | ((value ? 1UL : 0UL) << 6);
+ }
+
public NativeArray<PipelineShaderStageCreateInfo> Stages;
public NativeArray<PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT> StageRequiredSubgroupSizes;
public PipelineLayout PipelineLayout;
@@ -331,6 +337,7 @@ namespace Ryujinx.Graphics.Vulkan
LineWidth = 1f;
SamplesCount = 1;
+ DepthMode = true;
}
public unsafe Auto<DisposablePipeline> CreateComputePipeline(
@@ -482,6 +489,17 @@ namespace Ryujinx.Graphics.Vulkan
PScissors = pScissors
};
+ if (gd.Capabilities.SupportsDepthClipControl)
+ {
+ var viewportDepthClipControlState = new PipelineViewportDepthClipControlCreateInfoEXT()
+ {
+ SType = StructureType.PipelineViewportDepthClipControlCreateInfoExt,
+ NegativeOneToOne = DepthMode
+ };
+
+ viewportState.PNext = &viewportDepthClipControlState;
+ }
+
var multisampleState = new PipelineMultisampleStateCreateInfo
{
SType = StructureType.PipelineMultisampleStateCreateInfo,