i965: Defer the throttle until we submit new commands
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Mar 2015 12:21:29 +0000 (12:21 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 18 Mar 2015 09:33:33 +0000 (09:33 +0000)
commiteeb504e0ae7796e7ba475f6e9d6c26daa6b06608
tree9acd17ccf04e0e6266cc0cde1cb185293faa6730
parent64788b2e8dc2ddedc2712ed02b7e9096638b7bae
i965: Defer the throttle until we submit new commands

Currently, we throttle before the user begins preparing commands for the
next frame when we acquire the draw/read buffers. However, construction
of the command buffer can itself take significant time relative to the
frame time. If we move the throttle from the buffer acquire to the
command submit phase we can allow the user to improve concurrency
between the CPU and GPU (i.e. reduce the amount of time we waste inside
the throttle).

v2: Whitespace + delay throttling until after the next submission for
greater parallelism

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Kristian Høgsberg <krh@bitplanet.net>
Cc: Chad Versace <chad.versace@linux.intel.com>
Cc: Ian Romanick <idr@freedesktop.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com> [v1]
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/intel_batchbuffer.c