etnaviv: move dummy BOs to screen
authorLucas Stach <l.stach@pengutronix.de>
Sun, 10 Jul 2022 13:21:00 +0000 (15:21 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 13 Jul 2022 15:00:33 +0000 (15:00 +0000)
commit2c08decc8f3e07eaaf56f9882311167efafb45ea
treecb1f7187c718c28223765f539c4060b2a3b7a56b
parentf7f74a984b093822126c1fac8e89474c9fc1e619
etnaviv: move dummy BOs to screen

The dummy texture descriptor and the dummy render target relocs are not ever
changed by a context operation, so we can save some space by moving them to
the screen and potentially share them and the BOs backing them between
multiple contexts.

Also don't hold two pointers to the same BO, one in the reloc and one raw,
but always just use the reloc one.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17448>
src/gallium/drivers/etnaviv/etnaviv_context.c
src/gallium/drivers/etnaviv/etnaviv_context.h
src/gallium/drivers/etnaviv/etnaviv_screen.c
src/gallium/drivers/etnaviv/etnaviv_screen.h
src/gallium/drivers/etnaviv/etnaviv_state.c
src/gallium/drivers/etnaviv/etnaviv_texture_desc.c