asahi: fix get_batch with compute batches

we'll be able to switch between compute and gfx queues soon, handle that instead
of assert failing.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963>
This commit is contained in:
Alyssa Rosenzweig
2023-12-07 13:26:44 -04:00
parent b8f737937f
commit 10e528a495

View File

@@ -310,7 +310,7 @@ agx_get_batch_for_framebuffer(struct agx_context *ctx,
struct agx_batch *
agx_get_batch(struct agx_context *ctx)
{
if (!ctx->batch) {
if (!ctx->batch || agx_batch_is_compute(ctx->batch)) {
ctx->batch = agx_get_batch_for_framebuffer(ctx, &ctx->framebuffer);
agx_dirty_all(ctx);
}