}
}
- brw->state.dirty.cache |= CACHE_NEW_CC_VP;
+ if (brw->gen >= 7) {
+ BEGIN_BATCH(2);
+ OUT_BATCH(_3DSTATE_VIEWPORT_STATE_POINTERS_CC << 16 | (2 - 2));
+ OUT_BATCH(brw->cc.vp_offset);
+ ADVANCE_BATCH();
+ } else {
+ brw->state.dirty.cache |= CACHE_NEW_CC_VP;
+ }
}
const struct brw_tracked_state brw_cc_vp = {
extern const struct brw_tracked_state gen6_wm_push_constants;
extern const struct brw_tracked_state gen6_wm_state;
extern const struct brw_tracked_state gen7_depthbuffer;
-extern const struct brw_tracked_state gen7_cc_viewport_state_pointer;
extern const struct brw_tracked_state gen7_clip_state;
extern const struct brw_tracked_state gen7_disable_stages;
extern const struct brw_tracked_state gen7_gs_push_constants;
&brw_state_base_address,
&brw_cc_vp,
- &gen7_cc_viewport_state_pointer, /* must do after brw_cc_vp */
&gen7_sf_clip_viewport,
&gen7_push_constant_space,
&gen8_state_base_address,
&brw_cc_vp,
- &gen7_cc_viewport_state_pointer, /* must do after brw_cc_vp */
&gen8_sf_clip_viewport,
&gen7_push_constant_space,
},
.emit = gen7_upload_sf_clip_viewport,
};
-
-/* ----------------------------------------------------- */
-
-static void upload_cc_viewport_state_pointer(struct brw_context *brw)
-{
- BEGIN_BATCH(2);
- OUT_BATCH(_3DSTATE_VIEWPORT_STATE_POINTERS_CC << 16 | (2 - 2));
- OUT_BATCH(brw->cc.vp_offset);
- ADVANCE_BATCH();
-}
-
-const struct brw_tracked_state gen7_cc_viewport_state_pointer = {
- .dirty = {
- .mesa = 0,
- .brw = BRW_NEW_BATCH,
- .cache = CACHE_NEW_CC_VP
- },
- .emit = upload_cc_viewport_state_pointer,
-};