iris: max VP index
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 20 Jun 2018 22:35:10 +0000 (15:35 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:07 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index b04e13d6f477aa417532c6e9d8e4d389ebb57ead..9496162ebcc11b9087fa9b8048cf6e13e7cd88db 100644 (file)
@@ -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));