summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/gen8_pipeline.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-06-14 08:40:49 -0700
committerJason Ekstrand <[email protected]>2016-06-20 12:04:08 -0700
commiteb6764c4a73006eee32e19e3afc6eab100a2ce16 (patch)
treeb907a0efc58a59609dd6b0297e8ecadb5585c5d5 /src/intel/vulkan/gen8_pipeline.c
parent8a46b505cb2c7255ad430b56c1ce0dfa9c13c559 (diff)
anv: Add proper support for depth clamping
Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
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,