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>
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);