From f20fc950a7c360641d06f94e545071083a27d4dc Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 5 Jul 2018 02:48:23 -0700 Subject: [PATCH] iris: fix depth bounds clamp enables fixes depthrange-clear among others --- src/gallium/drivers/iris/iris_state.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; -- 2.30.2