freedreno/a6xx: Do tex-state invalidates in same ctx
authorRob Clark <robdclark@chromium.org>
Sat, 11 Feb 2023 15:49:07 +0000 (07:49 -0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 16 Feb 2023 19:57:13 +0000 (19:57 +0000)
commitf91bcd2455973af6c046b18ce32d3636b2482827
tree313729df72cce5fbf57f983a20621357a1327e61
parente7993d68e2765ea89dbb771042cac45866d5a7d2
freedreno/a6xx: Do tex-state invalidates in same ctx

If a resource invalidate is triggered by a different ctx (potentially on
a different thread) simply flag that the tex state needs invalidation,
but defer handling it to the ctx that owns the tex state.

This will let us remove atomic refcnt'ing on the tex state, and more
importantly atomic refcnt'ing on the fd_ringbuffer (as this was the one
special case where rb's could be accessed from multiple threads).

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