From 8d68a90e225d831a395ba788e425cb717eec1f9a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 10 Feb 2011 20:25:51 +0000 Subject: intel: use pwrite for batch It's faster. Not only is the memcpy more efficiently performed in the kernel (making up for the system call overhead), but by not using mmap we remove the greater overhead of tracking the vma of every batch. And it means we can read back from the batch buffer without incurring the cost of a uncached read through the GTT. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_cc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/i965/brw_cc.c') diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c index 408783a3e6..c37376ef0d 100644 --- a/src/mesa/drivers/dri/i965/brw_cc.c +++ b/src/mesa/drivers/dri/i965/brw_cc.c @@ -214,7 +214,7 @@ static void upload_cc_unit(struct brw_context *brw) brw->state.dirty.cache |= CACHE_NEW_CC_UNIT; /* Emit CC viewport relocation */ - drm_intel_bo_emit_reloc(brw->intel.batch->buf, + drm_intel_bo_emit_reloc(brw->intel.batch.bo, (brw->cc.state_offset + offsetof(struct brw_cc_unit_state, cc4)), brw->cc.vp_bo, 0, -- cgit v1.2.3