From afe27d5345f3addf770a2dee3f74c42f9ab93ae9 Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Mon, 23 Mar 2020 21:33:36 -0400 Subject: [PATCH] turnip: fix znear clipping Vulkan clips znear at 0 instead of -1. Fixes dEQP-VK.draw.inverted_depth_ranges.nodepthclamp_* Signed-off-by: Jonathan Marek Part-of: --- src/freedreno/vulkan/tu_pipeline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index 3d25428fe82..1604bec0e1b 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -1343,7 +1343,8 @@ static void tu6_emit_gras_unknowns(struct tu_cs *cs) { tu_cs_emit_pkt4(cs, REG_A6XX_GRAS_CL_CNTL, 1); - tu_cs_emit(cs, A6XX_GRAS_CL_CNTL_VP_CLIP_CODE_IGNORE); + tu_cs_emit(cs, A6XX_GRAS_CL_CNTL_ZERO_GB_SCALE_Z | + A6XX_GRAS_CL_CNTL_VP_CLIP_CODE_IGNORE); tu_cs_emit_pkt4(cs, REG_A6XX_GRAS_UNKNOWN_8001, 1); tu_cs_emit(cs, 0x0); tu_cs_emit_pkt4(cs, REG_A6XX_GRAS_LAYER_CNTL, 1); -- 2.30.2