Module: Mesa Branch: master Commit: 60bdf61d6859f18ec151e332d6bbc6f014669a8e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=60bdf61d6859f18ec151e332d6bbc6f014669a8e
Author: Dave Airlie <[email protected]> Date: Wed Apr 7 11:18:44 2021 +1000 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 <[email protected]> Reviewed-By: Mike Blumenkrantz <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10068> --- 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 || _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
