From 636cf8971eced9400cc480dbbe4ac82dd27dd8fb Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 20 Jun 2018 15:35:10 -0700 Subject: [PATCH] iris: max VP index --- src/gallium/drivers/iris/iris_state.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)); -- 2.30.2