From: Jonathan Marek Date: Tue, 24 Mar 2020 01:33:36 +0000 (-0400) Subject: turnip: fix znear clipping X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=afe27d5345f3addf770a2dee3f74c42f9ab93ae9;p=mesa.git 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: --- 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);