Reuse the common upload bo for the temporary blitter storage to try and minimise resource usage.
Caveats: this may impose a read-read relationship on the buffer between the blitter and render engines, and may add stalls on old kernels. Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> --- src/mesa/drivers/dri/i965/intel_buffer_objects.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c index 32df381..2b18e2c 100644 --- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c @@ -235,17 +235,13 @@ brw_buffer_subdata(struct gl_context *ctx, (long)offset, (long)offset + size, (long)(size/1024), intel_obj->gpu_active_start, intel_obj->gpu_active_end); - brw_bo *temp_bo = - brw_bo_create(&brw->batch, "subdata temp", size, 64, 0); - - brw_bo_write(temp_bo, 0, data, size, 0, - PERF_DEBUG(brw, "BufferSubData")); - + uint32_t upload; + brw_bo *temp_bo = NULL; + intel_upload_data(brw, data, size, 64, &temp_bo, &upload); intel_emit_linear_blit(brw, intel_obj->buffer, offset, - temp_bo, 0, + temp_bo, upload, size); - brw_bo_put(temp_bo); return; } else { -- 2.5.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev