From 60bdf61d6859f18ec151e332d6bbc6f014669a8e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 7 Apr 2021 11:18:44 +1000 Subject: [PATCH] llvmpipe: always take depth clamping from state tracker Don't be smarter than state tracker here, of d3d10 wants to do something the state tracker should hard code that. Since lavapipe wants to use clip_halfz and depth clipping independently. This fixes some issues blitting Z that zink was seeing Reviewed-by: Roland Scheidegger Reviewed-By: Mike Blumenkrantz Part-of: --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index b90a13f83e7..4d13dd64393 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -3986,20 +3986,8 @@ make_variant_key(struct llvmpipe_context *lp, * Propagate the depth clamp setting from the rasterizer state. * depth_clip == 0 implies depth clamping is enabled. * - * When clip_halfz is enabled, then always clamp the depth values. - * - * XXX: This is incorrect for GL, but correct for d3d10 (depth - * clamp is always active in d3d10, regardless if depth clip is - * enabled or not). - * (GL has an always-on [0,1] clamp on fs depth output instead - * to ensure the depth values stay in range. Doesn't look like - * we do that, though...) */ - if (lp->rasterizer->clip_halfz) { - key->depth_clamp = 1; - } else { - key->depth_clamp = (lp->rasterizer->depth_clip_near == 0) ? 1 : 0; - } + key->depth_clamp = (lp->rasterizer->depth_clip_near == 0) ? 1 : 0; /* alpha test only applies if render buffer 0 is non-integer (or does not exist) */ if (!lp->framebuffer.nr_cbufs ||