asahi: Assert we don't transition shared resources

This is an invariant maintained by all current callers and subtly required for
the BO swapping to work. Assert it to make it obvious.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
This commit is contained in:
Alyssa Rosenzweig
2023-06-26 16:23:01 -04:00
committed by Marge Bot
parent 1140bdb783
commit 98de1b1b95
+1
View File
@@ -1077,6 +1077,7 @@ transition_resource(struct pipe_context *pctx, struct agx_resource *rsrc,
agx_resource(pctx->screen->resource_create(pctx->screen, templ));
assert(new_res);
assert(!(rsrc->base.bind & PIPE_BIND_SHARED) && "cannot swap BOs if shared");
int level;
BITSET_FOREACH_SET(level, rsrc->data_valid, PIPE_MAX_TEXTURE_LEVELS) {