asahi: Fix segfault with null drawbuffer

Fixes fbo-drawbuffers-none piglit.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20569>
This commit is contained in:
Alyssa Rosenzweig 2023-01-07 15:25:49 -05:00 committed by Marge Bot
parent 9b67afb55d
commit 615c3a078b

View file

@ -70,7 +70,8 @@ agx_batch_init(struct agx_context *ctx,
}
for (unsigned i = 0; i < key->nr_cbufs; ++i) {
agx_batch_writes(batch, agx_resource(key->cbufs[i]->texture));
if (key->cbufs[i])
agx_batch_writes(batch, agx_resource(key->cbufs[i]->texture));
}
unsigned batch_idx = agx_batch_idx(batch);