swr: Rework scratch space allocation
authorGeorge Kyriazis <george.kyriazis@intel.com>
Wed, 18 Oct 2017 19:10:26 +0000 (14:10 -0500)
committerGeorge Kyriazis <george.kyriazis@intel.com>
Fri, 20 Oct 2017 01:18:09 +0000 (20:18 -0500)
commitf9d239e11fe044de0e977fd1d3a62d9f6a92e49d
tree93b39c63bd5b9dc1b0c1ce9310d8bf62538c40bc
parentffaf4d608a19cf891036de193489c2f6aecb1b23
swr: Rework scratch space allocation

Remove allocation of > 2kbyte buffers into context memory in
swr_copy_to_scatch_space() (which is used to copy small vertex/index buffers
and shader constants to a scratch space to be used by the upcoming draw.)

Large shader constant allocations need to be done in the circular scratch
buffer instead of context memory, because their values persist across
render calls.

Also lower SCRATCH_SINGLE_ALLOCATION_LIMIT to 8k, since allocations of larger
buffers will get too large for the circular scratch space.

Fixes render issues with CEI Ensight.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/swr_scratch.cpp
src/gallium/drivers/swr/swr_screen.cpp