*/
static void
brw_upload_binding_table(struct brw_context *brw,
+ uint32_t packet_name,
GLbitfield brw_new_binding_table,
struct brw_stage_state *stage_state)
{
}
brw->state.dirty.brw |= brw_new_binding_table;
+
+ if (brw->gen >= 7) {
+ BEGIN_BATCH(2);
+ OUT_BATCH(packet_name << 16 | (2 - 2));
+ OUT_BATCH(stage_state->bind_bo_offset);
+ ADVANCE_BATCH();
+ }
}
/**
static void
brw_vs_upload_binding_table(struct brw_context *brw)
{
- brw_upload_binding_table(brw, BRW_NEW_VS_BINDING_TABLE, &brw->vs.base);
+ brw_upload_binding_table(brw,
+ _3DSTATE_BINDING_TABLE_POINTERS_VS,
+ BRW_NEW_VS_BINDING_TABLE, &brw->vs.base);
}
const struct brw_tracked_state brw_vs_binding_table = {
static void
brw_upload_wm_binding_table(struct brw_context *brw)
{
- brw_upload_binding_table(brw, BRW_NEW_PS_BINDING_TABLE, &brw->wm.base);
+ brw_upload_binding_table(brw,
+ _3DSTATE_BINDING_TABLE_POINTERS_PS,
+ BRW_NEW_PS_BINDING_TABLE, &brw->wm.base);
}
const struct brw_tracked_state brw_wm_binding_table = {
if (brw->geometry_program == NULL)
return;
- brw_upload_binding_table(brw, BRW_NEW_GS_BINDING_TABLE, &brw->gs.base);
+ brw_upload_binding_table(brw,
+ _3DSTATE_BINDING_TABLE_POINTERS_GS,
+ BRW_NEW_GS_BINDING_TABLE, &brw->gs.base);
}
const struct brw_tracked_state brw_gs_binding_table = {
const int max_threads_shift = brw->is_haswell ?
HSW_PS_MAX_THREADS_SHIFT : IVB_PS_MAX_THREADS_SHIFT;
- /* BRW_NEW_PS_BINDING_TABLE */
- BEGIN_BATCH(2);
- OUT_BATCH(_3DSTATE_BINDING_TABLE_POINTERS_PS << 16 | (2 - 2));
- OUT_BATCH(brw->wm.base.bind_bo_offset);
- ADVANCE_BATCH();
-
/* CACHE_NEW_SAMPLER */
BEGIN_BATCH(2);
OUT_BATCH(_3DSTATE_SAMPLER_STATE_POINTERS_PS << 16 | (2 - 2));
struct gl_context *ctx = &brw->ctx;
uint32_t dw3 = 0, dw6 = 0, dw7 = 0;
- /* BRW_NEW_PS_BINDING_TABLE */
- BEGIN_BATCH(2);
- OUT_BATCH(_3DSTATE_BINDING_TABLE_POINTERS_PS << 16 | (2 - 2));
- OUT_BATCH(brw->wm.base.bind_bo_offset);
- ADVANCE_BATCH();
-
/* CACHE_NEW_SAMPLER */
BEGIN_BATCH(2);
OUT_BATCH(_3DSTATE_SAMPLER_STATE_POINTERS_PS << 16 | (2 - 2));