diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-02-10 20:25:51 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-02-21 12:59:35 +0000 |
commit | 8d68a90e225d831a395ba788e425cb717eec1f9a (patch) | |
tree | 1c46eb19125ebbb205625783dd184e0489231d01 /src/mesa/drivers/dri/intel/intel_pixel_read.c | |
parent | 3f55683927278e57f3ef8a151d15f4cffdc060dc (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/intel/intel_pixel_read.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_pixel_read.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_read.c b/src/mesa/drivers/dri/intel/intel_pixel_read.c index 716b9cea40..f90f8224c9 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel_read.c +++ b/src/mesa/drivers/dri/intel/intel_pixel_read.c @@ -78,7 +78,6 @@ do_blit_readpixels(struct gl_context * ctx, GLuint dst_offset; GLuint rowLength; drm_intel_bo *dst_buffer; - GLuint offset; GLboolean all; GLint dst_x, dst_y; @@ -148,7 +147,7 @@ do_blit_readpixels(struct gl_context * ctx, if (!intelEmitCopyBlit(intel, src->cpp, src->pitch, src->buffer, 0, src->tiling, - rowLength, dst_buffer, dst_offset + offset, GL_FALSE, + rowLength, dst_buffer, dst_offset, GL_FALSE, x, y, dst_x, dst_y, width, height, |