freedreno: Fix u_blitter constant-buffer leak
authorRob Clark <robdclark@chromium.org>
Thu, 4 Mar 2021 19:24:49 +0000 (11:24 -0800)
committerMarge Bot <eric+marge@anholt.net>
Thu, 11 Mar 2021 04:42:15 +0000 (04:42 +0000)
commitbcf4562528ee0d176923b33a3e8995d4d282477a
treeb909886b1ed463ea20e10ae229c0dda9a2b32305
parent9425b1343ebb03431dd0aecf1e4f19ab5126b7f8
freedreno: Fix u_blitter constant-buffer leak

We didn't see this before without threaded_context because we (normally)
wouldn't upload cb0 (the slot u_blitter uses).  But with cb0 getting
uploaded we could hit a leak due to constant state only being restored
in the fd_blitter_clear() path.  Move cb0 save to the one path that uses
it.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323>
src/gallium/drivers/freedreno/freedreno_blitter.c