i965: Massively simplify the intel_upload implementation.
authorEric Anholt <eric@anholt.net>
Thu, 24 Jan 2013 01:05:10 +0000 (17:05 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 26 Mar 2014 20:13:26 +0000 (13:13 -0700)
commit3b579882903c577daa1af286a5e0bf5bc122a34d
tree79013294b0c19a6d6ad98f6c4a3307bfce3a9bfa
parentb1909b260f6c3855c8214319c602fc7adea7faf9
i965: Massively simplify the intel_upload implementation.

The implementation kept a page-sized area for uploading data, and
uploaded chunks from that to a 64kb-sized streamed buffer.  This wasted
cache footprint (and extra state tracking to do so) when we want to just
write our data into the buffer immediately.

Instead, build it around an interface like brw_state_batch() that just
gets you a pointer to BO memory to upload your stuff immediately.

Improves OpenArena on HSW by 1.62209% +/- 0.355299% (n=61) and on BYT by
1.7916% +/- 0.415743% (n=31).

v2: Rebase on Mesa master, drop old prototypes.  Re-do performance
    comparison on a kernel that doesn't punish CPU efficiency
    improvements.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_draw_upload.c
src/mesa/drivers/dri/i965/intel_buffer_objects.h
src/mesa/drivers/dri/i965/intel_upload.c