i965: Generalize intel_upload.c to support multiple uploaders.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 27 Feb 2018 07:17:35 +0000 (23:17 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 2 Mar 2018 22:19:33 +0000 (14:19 -0800)
commiteb99bf8abe367aaf01ccf50347b510d8cfb87688
tree76243676b2864934cc2b456f67f985b2f2d43199
parent56dc9f9f49638e0769d6bc696ff7f5dafccec9fc
i965: Generalize intel_upload.c to support multiple uploaders.

I'd like to reuse the upload logic for a new program cache, but the
buffers will need to have a different lifetime than the default
uploader, and also some address space restrictions.  So, we can't
use a single uploader for both situations - we'll need two of them.

This creates a public 'uploader' structure, and adjusts the interface
to take an uploader rather than always using brw->upload.  It should
have no functional change at the moment.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_curbe.c
src/mesa/drivers/dri/i965/brw_draw_upload.c
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/i965/gen6_constant_state.c
src/mesa/drivers/dri/i965/intel_batchbuffer.c
src/mesa/drivers/dri/i965/intel_buffer_objects.h
src/mesa/drivers/dri/i965/intel_upload.c