OUT_BATCH(brw->cc.vp_offset);
ADVANCE_BATCH();
} else {
- brw->state.dirty.cache |= CACHE_NEW_CC_VP;
+ brw->state.dirty.brw |= BRW_NEW_CC_VP;
}
}
if (brw->stats_wm || unlikely(INTEL_DEBUG & DEBUG_STATS))
cc->cc5.statistics_enable = 1;
- /* CACHE_NEW_CC_VP */
+ /* BRW_NEW_CC_VP */
cc->cc4.cc_viewport_state_offset = (brw->batch.bo->offset64 +
brw->cc.vp_offset) >> 5; /* reloc */
_NEW_DEPTH |
_NEW_STENCIL,
.brw = BRW_NEW_BATCH |
+ BRW_NEW_CC_VP |
BRW_NEW_STATS_WM,
- .cache = CACHE_NEW_CC_VP
+ .cache = 0
},
.emit = upload_cc_unit,
};
BRW_STATE_NUM_SAMPLES,
BRW_STATE_TEXTURE_BUFFER,
BRW_STATE_GEN4_UNIT_STATE,
+ BRW_STATE_CC_VP,
+ BRW_STATE_SF_VP,
+ BRW_STATE_CLIP_VP,
BRW_NUM_STATE_BITS
};
#define BRW_NEW_NUM_SAMPLES (1ull << BRW_STATE_NUM_SAMPLES)
#define BRW_NEW_TEXTURE_BUFFER (1ull << BRW_STATE_TEXTURE_BUFFER)
#define BRW_NEW_GEN4_UNIT_STATE (1ull << BRW_STATE_GEN4_UNIT_STATE)
+#define BRW_NEW_CC_VP (1ull << BRW_STATE_CC_VP)
+#define BRW_NEW_SF_VP (1ull << BRW_STATE_SF_VP)
+#define BRW_NEW_CLIP_VP (1ull << BRW_STATE_CLIP_VP)
struct brw_state_flags {
/** State update flags signalled by mesa internals */
#define SHADER_TIME_STRIDE 64
enum brw_cache_id {
- BRW_CC_VP,
BRW_WM_PROG,
BRW_BLORP_BLIT_PROG,
BRW_SAMPLER,
BRW_SF_PROG,
- BRW_SF_VP,
BRW_VS_PROG,
BRW_FF_GS_PROG,
BRW_GS_PROG,
- BRW_CLIP_VP,
BRW_CLIP_PROG,
BRW_MAX_CACHE
/* Flags for brw->state.cache.
*/
-#define CACHE_NEW_CC_VP (1<<BRW_CC_VP)
#define CACHE_NEW_WM_PROG (1<<BRW_WM_PROG)
#define CACHE_NEW_BLORP_BLIT_PROG (1<<BRW_BLORP_BLIT_PROG)
#define CACHE_NEW_SAMPLER (1<<BRW_SAMPLER)
#define CACHE_NEW_SF_PROG (1<<BRW_SF_PROG)
-#define CACHE_NEW_SF_VP (1<<BRW_SF_VP)
#define CACHE_NEW_VS_PROG (1<<BRW_VS_PROG)
#define CACHE_NEW_FF_GS_PROG (1<<BRW_FF_GS_PROG)
#define CACHE_NEW_GS_PROG (1<<BRW_GS_PROG)
-#define CACHE_NEW_CLIP_VP (1<<BRW_CLIP_VP)
#define CACHE_NEW_CLIP_PROG (1<<BRW_CLIP_PROG)
struct brw_vertex_buffer {
sfv->scissor.ymax = ctx->DrawBuffer->Height - ctx->DrawBuffer->_Ymin - 1;
}
- brw->state.dirty.cache |= CACHE_NEW_SF_VP;
+ brw->state.dirty.brw |= BRW_NEW_SF_VP;
}
const struct brw_tracked_state brw_sf_vp = {
if (unlikely(INTEL_DEBUG & DEBUG_STATS))
sf->thread4.stats_enable = 1;
- /* CACHE_NEW_SF_VP */
+ /* BRW_NEW_SF_VP */
sf->sf5.sf_viewport_state_offset = (brw->batch.bo->offset64 +
brw->sf.vp_offset) >> 5; /* reloc */
_NEW_SCISSOR,
.brw = BRW_NEW_BATCH |
BRW_NEW_PROGRAM_CACHE |
+ BRW_NEW_SF_VP |
BRW_NEW_URB_FENCE,
- .cache = CACHE_NEW_SF_PROG |
- CACHE_NEW_SF_VP,
+ .cache = CACHE_NEW_SF_PROG,
},
.emit = upload_sf_unit,
};
DEFINE_BIT(BRW_NEW_NUM_SAMPLES),
DEFINE_BIT(BRW_NEW_TEXTURE_BUFFER),
DEFINE_BIT(BRW_NEW_GEN4_UNIT_STATE),
+ DEFINE_BIT(BRW_NEW_CC_VP),
+ DEFINE_BIT(BRW_NEW_SF_VP),
+ DEFINE_BIT(BRW_NEW_CLIP_VP),
{0, 0, 0}
};
static struct dirty_bit_map cache_bits[] = {
- DEFINE_BIT(CACHE_NEW_CC_VP),
DEFINE_BIT(CACHE_NEW_WM_PROG),
DEFINE_BIT(CACHE_NEW_BLORP_BLIT_PROG),
DEFINE_BIT(CACHE_NEW_SAMPLER),
DEFINE_BIT(CACHE_NEW_SF_PROG),
- DEFINE_BIT(CACHE_NEW_SF_VP),
DEFINE_BIT(CACHE_NEW_VS_PROG),
DEFINE_BIT(CACHE_NEW_FF_GS_PROG),
DEFINE_BIT(CACHE_NEW_GS_PROG),
- DEFINE_BIT(CACHE_NEW_CLIP_VP),
DEFINE_BIT(CACHE_NEW_CLIP_PROG),
{0, 0, 0}
};
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 = {
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 = 0,
.brw = BRW_NEW_BATCH |
+ BRW_NEW_CC_VP |
+ BRW_NEW_CLIP_VP |
+ BRW_NEW_SF_VP |
BRW_NEW_STATE_BASE_ADDRESS,
- .cache = CACHE_NEW_CC_VP |
- CACHE_NEW_CLIP_VP |
- CACHE_NEW_SF_VP,
+ .cache = 0,
},
.emit = upload_viewport_state_pointers,
};