summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_state_dump.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-02-10 20:25:51 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-02-21 12:59:35 +0000
commit8d68a90e225d831a395ba788e425cb717eec1f9a (patch)
tree1c46eb19125ebbb205625783dd184e0489231d01 /src/mesa/drivers/dri/i965/brw_state_dump.c
parent3f55683927278e57f3ef8a151d15f4cffdc060dc (diff)
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_state_dump.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_dump.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c
index 6c153319b82..fdce79da2f4 100644
--- a/src/mesa/drivers/dri/i965/brw_state_dump.c
+++ b/src/mesa/drivers/dri/i965/brw_state_dump.c
@@ -104,7 +104,7 @@ static void dump_wm_surface_state(struct brw_context *brw)
GLubyte *base;
int i;
- bo = brw->intel.batch->buf;
+ bo = brw->intel.batch.bo;
drm_intel_bo_map(bo, GL_FALSE);
base = bo->virtual;
@@ -285,7 +285,7 @@ static void dump_cc_state(struct brw_context *brw)
const char *name = "CC";
struct gen6_color_calc_state *cc;
uint32_t cc_off;
- dri_bo *bo = brw->intel.batch->buf;
+ dri_bo *bo = brw->intel.batch.bo;
if (brw->cc.state_offset == 0)
return;
@@ -376,7 +376,7 @@ void brw_debug_batch(struct intel_context *intel)
struct brw_context *brw = brw_context(&intel->ctx);
state_struct_out("WM bind",
- brw->intel.batch->buf,
+ brw->intel.batch.bo,
brw->wm.bind_bo_offset,
4 * brw->wm.nr_surfaces);
dump_wm_surface_state(brw);