static void
upload_sampler_state_pointers(struct brw_context *brw)
{
- struct intel_context *intel = &brw->intel;
-
BEGIN_BATCH(4);
OUT_BATCH(_3DSTATE_SAMPLER_STATE_POINTERS << 16 |
VS_SAMPLER_STATE_CHANGE |
GS_SAMPLER_STATE_CHANGE |
PS_SAMPLER_STATE_CHANGE |
(4 - 2));
- OUT_BATCH(0); /* VS */
- OUT_BATCH(0); /* GS */
- if (brw->wm.sampler_count)
- OUT_RELOC(intel->batch.bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
- brw->wm.sampler_offset);
- else
- OUT_BATCH(0);
-
+ OUT_BATCH(brw->vs.base.sampler_offset); /* VS */
+ OUT_BATCH(brw->gs.base.sampler_offset); /* GS */
+ OUT_BATCH(brw->wm.base.sampler_offset);
ADVANCE_BATCH();
}
const struct brw_tracked_state gen6_sampler_state = {
.dirty = {
.mesa = 0,
- .brw = BRW_NEW_BATCH,
- .cache = CACHE_NEW_SAMPLER
+ .brw = BRW_NEW_BATCH |
+ BRW_NEW_SAMPLER_STATE_TABLE |
+ BRW_NEW_STATE_BASE_ADDRESS,
},
.emit = upload_sampler_state_pointers,
};