* Callers must explicitly flush the pipeline to ensure the desired value is
* available.
*/
-static void
-write_reg(struct brw_context *brw,
- drm_intel_bo *query_bo, uint32_t reg, int idx)
+void
+brw_store_register_mem64(struct brw_context *brw,
+ drm_intel_bo *bo, uint32_t reg, int idx)
{
assert(brw->gen >= 6);
BEGIN_BATCH(3);
OUT_BATCH(MI_STORE_REGISTER_MEM | (3 - 2));
OUT_BATCH(reg);
- OUT_RELOC(query_bo, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
+ OUT_RELOC(bo, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
idx * sizeof(uint64_t));
ADVANCE_BATCH();
BEGIN_BATCH(3);
OUT_BATCH(MI_STORE_REGISTER_MEM | (3 - 2));
OUT_BATCH(reg + sizeof(uint32_t));
- OUT_RELOC(query_bo, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
+ OUT_RELOC(bo, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
sizeof(uint32_t) + idx * sizeof(uint64_t));
ADVANCE_BATCH();
}
{
intel_batchbuffer_emit_mi_flush(brw);
- write_reg(brw, query_bo, CL_INVOCATION_COUNT, idx);
+ brw_store_register_mem64(brw, query_bo, CL_INVOCATION_COUNT, idx);
}
static void
write_xfb_primitives_written(struct brw_context *brw,
- drm_intel_bo *query_bo, int idx)
+ drm_intel_bo *bo, int idx)
{
intel_batchbuffer_emit_mi_flush(brw);
if (brw->gen >= 7) {
- write_reg(brw, query_bo, GEN7_SO_NUM_PRIMS_WRITTEN(0), idx);
+ brw_store_register_mem64(brw, bo, GEN7_SO_NUM_PRIMS_WRITTEN(0), idx);
} else {
- write_reg(brw, query_bo, GEN6_SO_NUM_PRIMS_WRITTEN, idx);
+ brw_store_register_mem64(brw, bo, GEN6_SO_NUM_PRIMS_WRITTEN, idx);
}
}