struct gl_context *ctx = &brw->ctx;
struct brw_cc_viewport *ccv;
+ /* BRW_NEW_VIEWPORT_COUNT */
+ const unsigned viewport_count = brw->clip.viewport_count;
+
ccv = brw_state_batch(brw, AUB_TRACE_CC_VP_STATE,
- sizeof(*ccv) * ctx->Const.MaxViewports, 32,
+ sizeof(*ccv) * viewport_count, 32,
&brw->cc.vp_offset);
/* _NEW_TRANSFORM */
- for (unsigned i = 0; i < ctx->Const.MaxViewports; i++) {
+ for (unsigned i = 0; i < viewport_count; i++) {
if (ctx->Transform.DepthClamp) {
/* _NEW_VIEWPORT */
ccv[i].min_depth = MIN2(ctx->ViewportArray[i].Near,
.mesa = _NEW_TRANSFORM |
_NEW_VIEWPORT,
.brw = BRW_NEW_BATCH |
- BRW_NEW_BLORP,
+ BRW_NEW_BLORP |
+ BRW_NEW_VIEWPORT_COUNT,
},
.emit = brw_upload_cc_vp
};