From: Kenneth Graunke Date: Wed, 20 Jun 2018 22:35:10 +0000 (-0700) Subject: iris: max VP index X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=636cf8971eced9400cc480dbbe4ac82dd27dd8fb;p=mesa.git iris: max VP index --- diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index b04e13d6f47..9496162ebcc 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1262,7 +1262,12 @@ iris_set_viewport_states(struct pipe_context *ctx, free(ice->state.cso_vp); ice->state.cso_vp = cso; - ice->state.num_viewports = num_viewports; + + if (num_viewports != ice->state.num_viewports) { + ice->state.num_viewports = num_viewports; + ice->state.dirty |= IRIS_DIRTY_CLIP; + } + ice->state.dirty |= IRIS_DIRTY_SF_CL_VIEWPORT; } @@ -2662,6 +2667,7 @@ iris_upload_render_state(struct iris_context *ice, cl.NonPerspectiveBarycentricEnable = true; cl.ForceZeroRTAIndexEnable = cso_fb->layers == 0; + cl.MaximumVPIndex = ice->state.num_viewports - 1; } iris_emit_merge(batch, cso_rast->clip, dynamic_clip, ARRAY_SIZE(cso_rast->clip));