asahi: Ignore spilled render targets with partial renders

Partial renders exist to the spill the tilebuffer to memory, there's nothing to
do if it's already spilled (and would just waste memory bandwidth and create a
feedback loop).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
This commit is contained in:
Alyssa Rosenzweig 2023-06-23 14:23:59 -04:00 committed by Marge Bot
parent dc38f24de3
commit 46b5406483

View file

@ -2261,6 +2261,12 @@ agx_build_meta(struct agx_batch *batch, bool store, bool partial_render)
if (store) {
/* TODO: Suppress stores to discarded render targets */
key.op[rt] = AGX_META_OP_STORE;
} else if (batch->tilebuffer_layout.spilled[rt] && partial_render) {
/* Partial render programs exist only to store/load the tilebuffer to
* main memory. When render targets are already spilled to main memory,
* there's nothing to do.
*/
key.op[rt] = AGX_META_OP_NONE;
} else {
struct agx_resource *rsrc = agx_resource(surf->texture);
bool valid = agx_resource_valid(rsrc, surf->u.tex.level);