asahi: Add new clear/reload/store infrastructure
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 19 Nov 2022 18:12:02 +0000 (13:12 -0500)
committerMarge Bot <emma+marge@anholt.net>
Sat, 19 Nov 2022 20:25:41 +0000 (20:25 +0000)
commitc5c0ea39f6a04ce26b505cf0276be26282336fa9
treeaaf10e96b30b4a715fa5112c18417b84f83dc400
parent4f96651f1e46ccc673c75534a7f7b17e3b18e6d7
asahi: Add new clear/reload/store infrastructure

With multiple render targets, it's not practical to generate all
variants of the background and end-of-tile programs at start up. Rather
than trying, add a hash table of meta program keys to background
programs, and compile variants as they're needed.

With the new infrastructure, it's sensible to handle clears with the
same code path as reloads. In addition to getting us closer to multiple
render target support, this gets us support for non-RGBA8 render
targets, as the u8norm tilebuffer format was baked into the hardcoded
clear shader and store shaders used before.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19871>
src/asahi/lib/agx_meta.c [new file with mode: 0644]
src/asahi/lib/agx_meta.h [new file with mode: 0644]
src/asahi/lib/meson.build