* drawable.
*/
const float maximum_post_clamp_delta = 8192;
- float gbx = maximum_post_clamp_delta / (float) ctx->Viewport.Width;
- float gby = maximum_post_clamp_delta / (float) ctx->Viewport.Height;
+ float gbx = maximum_post_clamp_delta / ctx->ViewportArray[0].Width;
+ float gby = maximum_post_clamp_delta / ctx->ViewportArray[0].Height;
vp->xmin = -gbx;
vp->xmax = gbx;
vp->ymin = -gby;
vp->ymax = gby;
- brw->state.dirty.cache |= CACHE_NEW_CLIP_VP;
+ brw->state.dirty.brw |= BRW_NEW_CLIP_VP;
}
const struct brw_tracked_state gen6_clip_vp = {
.dirty = {
.mesa = _NEW_VIEWPORT,
.brw = BRW_NEW_BATCH,
- .cache = 0,
},
.emit = gen6_upload_clip_vp,
};
struct brw_sf_viewport *sfv;
GLfloat y_scale, y_bias;
const bool render_to_fbo = _mesa_is_user_fbo(ctx->DrawBuffer);
- const GLfloat *v = ctx->Viewport._WindowMap.m;
+ const GLfloat *v = ctx->ViewportArray[0]._WindowMap.m;
sfv = brw_state_batch(brw, AUB_TRACE_SF_VP_STATE,
sizeof(*sfv), 32, &brw->sf.vp_offset);
sfv->viewport.m31 = v[MAT_TY] * y_scale + y_bias;
sfv->viewport.m32 = v[MAT_TZ] * depth_scale;
- brw->state.dirty.cache |= CACHE_NEW_SF_VP;
+ brw->state.dirty.brw |= BRW_NEW_SF_VP;
}
const struct brw_tracked_state gen6_sf_vp = {
.dirty = {
- .mesa = _NEW_VIEWPORT | _NEW_BUFFERS,
+ .mesa = _NEW_BUFFERS |
+ _NEW_VIEWPORT,
.brw = BRW_NEW_BATCH,
- .cache = 0,
},
.emit = gen6_upload_sf_vp,
};
const struct brw_tracked_state gen6_viewport_state = {
.dirty = {
.mesa = 0,
- .brw = (BRW_NEW_BATCH |
- BRW_NEW_STATE_BASE_ADDRESS),
- .cache = (CACHE_NEW_CLIP_VP |
- CACHE_NEW_SF_VP |
- CACHE_NEW_CC_VP)
+ .brw = BRW_NEW_BATCH |
+ BRW_NEW_CC_VP |
+ BRW_NEW_CLIP_VP |
+ BRW_NEW_SF_VP |
+ BRW_NEW_STATE_BASE_ADDRESS,
},
.emit = upload_viewport_state_pointers,
};