llvmpipe: pass stream-out targets to draw-module early
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 6 May 2019 13:35:04 +0000 (15:35 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 6 May 2019 20:42:37 +0000 (22:42 +0200)
commited53e61bec9e926b60ede093d4dd2bac56a4c605
tree88530417c073ed409db6b13b0e67702c21d165f7
parentfc7649c4b77bf2786332516b57b694825c73db53
llvmpipe: pass stream-out targets to draw-module early

We currently set this state in the draw-module twice on each draw, but
which trashes this state. So far that's not a problem, because we don't
really do much from that function.

But it turns out, we're going to have to do more; namely flush when the
state changes. This will incur a large performance penalty due to the
excessive setting.

Instead, let's rely on the CSO caching making sure that
llvmpipe_set_so_targets doesn't get called needlessly, and setup the
state directly there instead.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/llvmpipe/lp_draw_arrays.c
src/gallium/drivers/llvmpipe/lp_state_so.c