summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/gen8_pipeline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/vulkan/gen8_pipeline.c')
-rw-r--r--src/intel/vulkan/gen8_pipeline.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/intel/vulkan/gen8_pipeline.c b/src/intel/vulkan/gen8_pipeline.c
index 54585c32dd5..2a96be0d9d9 100644
--- a/src/intel/vulkan/gen8_pipeline.c
+++ b/src/intel/vulkan/gen8_pipeline.c
@@ -85,11 +85,11 @@ emit_rs_state(struct anv_pipeline *pipeline,
.BackFaceFillMode = vk_to_gen_fillmode[info->polygonMode],
.ScissorRectangleEnable = !(extra && extra->use_rectlist),
#if GEN_GEN == 8
- .ViewportZClipTestEnable = true,
+ .ViewportZClipTestEnable = !pipeline->depth_clamp_enable,
#else
/* GEN9+ splits ViewportZClipTestEnable into near and far enable bits */
- .ViewportZFarClipTestEnable = true,
- .ViewportZNearClipTestEnable = true,
+ .ViewportZFarClipTestEnable = !pipeline->depth_clamp_enable,
+ .ViewportZNearClipTestEnable = !pipeline->depth_clamp_enable,
#endif
.GlobalDepthOffsetEnableSolid = info->depthBiasEnable,
.GlobalDepthOffsetEnableWireframe = info->depthBiasEnable,