From: Kenneth Graunke Date: Thu, 5 Jul 2018 09:48:23 +0000 (-0700) Subject: iris: fix depth bounds clamp enables X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f20fc950a7c360641d06f94e545071083a27d4dc;p=mesa.git iris: fix depth bounds clamp enables fixes depthrange-clear among others --- diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index df724cedcee..7ba9c500cab 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -577,8 +577,13 @@ iris_create_zsa_state(struct pipe_context *ctx, } iris_pack_state(GENX(CC_VIEWPORT), cso->cc_vp, ccvp) { - ccvp.MinimumDepth = state->depth.bounds_min; - ccvp.MaximumDepth = state->depth.bounds_max; + if (state->depth.bounds_test) { + ccvp.MinimumDepth = state->depth.bounds_min; + ccvp.MaximumDepth = state->depth.bounds_max; + } else { + ccvp.MinimumDepth = 0.0; + ccvp.MaximumDepth = 1.0; + } } return cso;