key->urb_size = brw->urb.vsize;
}
-static dri_bo *
+static drm_intel_bo *
gs_unit_create_from_key(struct brw_context *brw, struct brw_gs_unit_key *key)
{
struct intel_context *intel = &brw->intel;
struct brw_gs_unit_state gs;
- dri_bo *bo;
+ drm_intel_bo *bo;
memset(&gs, 0, sizeof(gs));
if (intel->gen == 5)
gs.thread4.rendering_enable = 1;
- if (INTEL_DEBUG & DEBUG_STATS)
+ if (unlikely(INTEL_DEBUG & DEBUG_STATS))
gs.thread4.stats_enable = 1;
bo = brw_upload_cache(&brw->cache, BRW_GS_UNIT,
if (key->prog_active) {
/* Emit GS program relocation */
- dri_bo_emit_reloc(bo,
- I915_GEM_DOMAIN_INSTRUCTION, 0,
- gs.thread0.grf_reg_count << 1,
- offsetof(struct brw_gs_unit_state, thread0),
- brw->gs.prog_bo);
+ drm_intel_bo_emit_reloc(bo, offsetof(struct brw_gs_unit_state, thread0),
+ brw->gs.prog_bo, gs.thread0.grf_reg_count << 1,
+ I915_GEM_DOMAIN_INSTRUCTION, 0);
}
return bo;
gs_unit_populate_key(brw, &key);
- dri_bo_unreference(brw->gs.state_bo);
+ drm_intel_bo_unreference(brw->gs.state_bo);
brw->gs.state_bo = brw_search_cache(&brw->cache, BRW_GS_UNIT,
&key, sizeof(key),
&brw->gs.prog_bo, 1,