i965: Keep track of the per-thread scratch allocation in brw_stage_state.
authorFrancisco Jerez <currojerez@riseup.net>
Mon, 13 Jun 2016 21:56:22 +0000 (14:56 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 13 Jun 2016 22:55:58 +0000 (15:55 -0700)
commitd960284e447df9b1563deef0ce950617decfba63
tree60222b4182c52923d46d129b5f7d478ae81469ed
parent013ae4a70aeb40dc74e53943824bff33dda109e1
i965: Keep track of the per-thread scratch allocation in brw_stage_state.

This will be used to find out what per-thread slot size a previously
allocated scratch BO was used with in order to fix a hardware race
condition without introducing additional stalls or memory allocations.
Instead of calling brw_get_scratch_bo() manually from the various
codegen functions, call a new helper function that keeps track of the
per-thread scratch size and conditionally allocates a larger scratch
BO.

v2: Handle BO allocation manually instead of relying on
    brw_get_scratch_bo (Ken).

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_cs.c
src/mesa/drivers/dri/i965/brw_gs.c
src/mesa/drivers/dri/i965/brw_program.c
src/mesa/drivers/dri/i965/brw_tcs.c
src/mesa/drivers/dri/i965/brw_tes.c
src/mesa/drivers/dri/i965/brw_vs.c
src/mesa/drivers/dri/i965/brw_wm.c