@@ -313,7 +313,8 @@ enum brw_cache_id {
BRW_WM_UNIT,
BRW_SF_PROG,
BRW_SF_VP,
- BRW_SF_UNIT, /* scissor state on gen6 */
+ BRW_SF_UNIT,
+ BRW_SF_SCISSOR_UNIT,
BRW_VS_UNIT,
BRW_VS_PROG,
BRW_GS_UNIT,
@@ -387,6 +388,7 @@ struct brw_tracked_state {
#define CACHE_NEW_SF_PROG (1<<BRW_SF_PROG)
#define CACHE_NEW_SF_VP (1<<BRW_SF_VP)
#define CACHE_NEW_SF_UNIT (1<<BRW_SF_UNIT)
+#define CACHE_NEW_SF_SCISSOR_UNIT (1<<BRW_SF_SCISSOR_UNIT)
#define CACHE_NEW_VS_UNIT (1<<BRW_VS_UNIT)
#define CACHE_NEW_VS_PROG (1<<BRW_VS_PROG)
#define CACHE_NEW_GS_UNIT (1<<BRW_GS_UNIT)
@@ -375,6 +375,8 @@ brw_init_non_surface_cache(struct brw_context *brw)
brw_init_cache_id(cache, "SF_UNIT", BRW_SF_UNIT);
+ brw_init_cache_id(cache, "SF_SCISSOR_UNIT", BRW_SF_SCISSOR_UNIT);
+
brw_init_cache_id(cache, "VS_UNIT", BRW_VS_UNIT);
brw_init_cache_id(cache, "VS_PROG", BRW_VS_PROG);
@@ -74,7 +74,7 @@ prepare_scissor_state(struct brw_context *brw)
}
drm_intel_bo_unreference(brw->sf.state_bo);
- brw->sf.state_bo = brw_cache_data(&brw->cache, BRW_SF_UNIT,
+ brw->sf.state_bo = brw_cache_data(&brw->cache, BRW_SF_SCISSOR_UNIT,
&scissor, sizeof(scissor));
}