i965: Try to avoid stalls on the GPU when doing glBufferSubData().
authorEric Anholt <eric@anholt.net>
Fri, 4 Oct 2013 03:03:41 +0000 (20:03 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 23 Oct 2013 22:33:19 +0000 (15:33 -0700)
commitc298f5ff5681dd7c3cf0bf7c37a6f22430deeb91
tree76d47ef95657b9ff447d67baf8c2a75266b5652b
parent3b58e0ed642b1833b86dbefb36b6055a6709a720
i965: Try to avoid stalls on the GPU when doing glBufferSubData().

On DOTA2, framerate on dota2-de1.dem in windowed mode on my laptop
improves by 7.69854% +/- 0.909163% (n=3).  In a microbenchmark hitting
this code path (wall time of piglit vbo-subdata-many), runtime decreases
from 0.8 to 0.05 seconds.

v2: Use out of range start/end instead of separate bool for the active
    flag (suggestion by Jordan), fix double-upload in the stalling path.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_draw_upload.c
src/mesa/drivers/dri/i965/brw_object_purgeable.c
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/i965/gen7_sol_state.c
src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
src/mesa/drivers/dri/i965/intel_buffer_objects.c
src/mesa/drivers/dri/i965/intel_buffer_objects.h
src/mesa/drivers/dri/i965/intel_pixel_read.c
src/mesa/drivers/dri/i965/intel_tex_image.c