iris: fix depth bounds clamp enables

fixes depthrange-clear among others
This commit is contained in:
Kenneth Graunke 2018-07-05 02:48:23 -07:00
parent eb274a31bc
commit f20fc950a7

View file

@ -577,8 +577,13 @@ iris_create_zsa_state(struct pipe_context *ctx,
} }
iris_pack_state(GENX(CC_VIEWPORT), cso->cc_vp, ccvp) { iris_pack_state(GENX(CC_VIEWPORT), cso->cc_vp, ccvp) {
ccvp.MinimumDepth = state->depth.bounds_min; if (state->depth.bounds_test) {
ccvp.MaximumDepth = state->depth.bounds_max; ccvp.MinimumDepth = state->depth.bounds_min;
ccvp.MaximumDepth = state->depth.bounds_max;
} else {
ccvp.MinimumDepth = 0.0;
ccvp.MaximumDepth = 1.0;
}
} }
return cso; return cso;