freedreno: optimize rebind_resource()
authorRob Clark <robdclark@chromium.org>
Fri, 24 Apr 2020 21:45:04 +0000 (14:45 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Apr 2020 00:08:57 +0000 (00:08 +0000)
commitf12188ff5264b29f6270c40c7592543aca6c2f4a
tree0554ecf21dc7e215a3d04e4edcc1eb59bec9035c
parent1e18c58047ef5920dbe442bc6fc42e62dc0edb7d
freedreno: optimize rebind_resource()

Track how resources are used, ie. which state they may potentially dirty
if the backing bo is changed/reallocated, to optimize rebind_resource().

This will be more important in a later patch when we hook up eviction of
entries in a6xx tex state cache.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4744>
src/gallium/drivers/freedreno/freedreno_resource.c
src/gallium/drivers/freedreno/freedreno_resource.h
src/gallium/drivers/freedreno/freedreno_state.c
src/gallium/drivers/freedreno/freedreno_texture.c