freedreno/a6xx: Pre-bake SO-disable stateobj
authorRob Clark <robdclark@chromium.org>
Fri, 17 Sep 2021 19:22:30 +0000 (12:22 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 17 Sep 2021 20:03:40 +0000 (20:03 +0000)
commitbf74d58f219503947449bb2785414d6a9ea99b8b
tree579221997aef2c071e0e9948e97065bcfa67f683
parent60f12ac1273b41f39c94462ebbad8e5677884998
freedreno/a6xx: Pre-bake SO-disable stateobj

No need to re-create this every time we transition from stream-out
enabled to disabled.

Creation of streamout_disable_stateobj is deferred until we create
a program state using streamout to avoid creating it unnecessarily
and because fd6_prog_init() is called before ctx->pipe is created.
(Changing that ordering is complicated by the fact that u_blitter
copies pctx->bind_fs_state(), and friends.)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12918>
src/gallium/drivers/freedreno/a6xx/fd6_context.c
src/gallium/drivers/freedreno/a6xx/fd6_context.h
src/gallium/drivers/freedreno/a6xx/fd6_emit.c
src/gallium/drivers/freedreno/a6xx/fd6_program.c