[Mesa-dev] [PATCH 57/70] i965: Stage blitted buffer uploads through the common upload bo
Daniel Vetter
daniel at ffwll.ch
Mon Aug 10 01:40:29 PDT 2015
On Fri, Aug 07, 2015 at 09:14:01PM +0100, Chris Wilson wrote:
> 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.
Note that read-read has only landed in 4.2, hence we might want to hold
off on this one a bit until most distros have upgraded to this ;-)
-Daniel
>
> Signed-off-by: Chris Wilson <chris at 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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the mesa-dev
mailing list