We can just do it ourselves with MI_LOAD_REGISTER_IMM.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
brw->sol.offset_0_batch_start = 0;
if (intel->gen >= 7) {
- /* Ask the kernel to reset the SO offsets for any previous transform
- * feedback, so we start at the start of the user's buffer. (note: these
- * are not the query counters)
- */
- intel->batch.needs_sol_reset = true;
+ /* Reset the SOL buffer offset register. */
+ for (int i = 0; i < 4; i++) {
+ BEGIN_BATCH(3);
+ OUT_BATCH(MI_LOAD_REGISTER_IMM | (3 - 2));
+ OUT_BATCH(GEN7_SO_WRITE_OFFSET(i));
+ OUT_BATCH(0);
+ ADVANCE_BATCH();
+ }
}
}
intel->batch.reserved_space = BATCH_RESERVED;
intel->batch.state_batch_offset = intel->batch.bo->size;
intel->batch.used = 0;
- intel->batch.needs_sol_reset = false;
}
void
flags = I915_EXEC_BLT;
}
- if (batch->needs_sol_reset)
- flags |= I915_EXEC_GEN7_SOL_RESET;
-
if (ret == 0) {
if (unlikely(INTEL_DEBUG & DEBUG_AUB) && intel->vtbl.annotate_aub)
intel->vtbl.annotate_aub(intel);
uint32_t state_batch_offset;
bool is_blit;
- bool needs_sol_reset;
struct {
uint16_t used;