diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-02-08 20:01:10 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-02-21 12:59:34 +0000 |
commit | e476e122207e6195a16a8c7d2cab90eeba227934 (patch) | |
tree | 7c1a5f31a6078ffd7174f6a04816968f6fc3a382 /src/mesa/drivers/dri/intel/intel_pixel_read.c | |
parent | d0809d7b15ba58c05bb0b63128c9cf7042304cd2 (diff) |
intel: Pack dynamic draws together
Dynamic arrays have the tendency to be small and so allocating a bo for
each one is overkill and we can exploit many efficiency gains by packing
them together.
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 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_read.c b/src/mesa/drivers/dri/intel/intel_pixel_read.c index 54da29236d..716b9cea40 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel_read.c +++ b/src/mesa/drivers/dri/intel/intel_pixel_read.c @@ -78,6 +78,7 @@ 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; @@ -138,8 +139,8 @@ do_blit_readpixels(struct gl_context * ctx, dst_y = 0; dst_buffer = intel_bufferobj_buffer(intel, dst, - all ? INTEL_WRITE_FULL : - INTEL_WRITE_PART); + all ? INTEL_WRITE_FULL : + INTEL_WRITE_PART); if (ctx->ReadBuffer->Name == 0) y = ctx->ReadBuffer->Height - (y + height); @@ -147,7 +148,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, GL_FALSE, + rowLength, dst_buffer, dst_offset + offset, GL_FALSE, x, y, dst_x, dst_y, width, height, |