freedreno/a6xx: Move UBWC demotion to first sampler view bind
authorRob Clark <robdclark@chromium.org>
Tue, 9 Mar 2021 18:07:30 +0000 (10:07 -0800)
committerMarge Bot <eric+marge@anholt.net>
Thu, 11 Mar 2021 04:42:16 +0000 (04:42 +0000)
commit00eb60ee59eecf7b2a8a6d316c3e605c9dd91dbc
tree8421b05b3203494b73167ec666defd606b29ffd7
parentacc2c015b3bcd674c872e9d25678304918c06f08
freedreno/a6xx: Move UBWC demotion to first sampler view bind

With threaded_context, CSO creation happens in the frontend thread,
which means it is no longer safe to do blits (if needed, for sampler
views with format that cannot be UBWC).  So move this to the first
time that the sampler view is bound.

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