From 683dac24b29accef2f1f8b2d4625d0eeab6434e8 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 20 Nov 2023 08:24:45 -0400 Subject: [PATCH] asahi: be robust about null xfb fixes arb_enhanced_layouts-transform-feedback-layout-qualifiers tests. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/agx_streamout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/asahi/agx_streamout.c b/src/gallium/drivers/asahi/agx_streamout.c index 85452b62f62..59b270830c6 100644 --- a/src/gallium/drivers/asahi/agx_streamout.c +++ b/src/gallium/drivers/asahi/agx_streamout.c @@ -67,7 +67,7 @@ agx_set_stream_output_targets(struct pipe_context *pctx, unsigned num_targets, * Gallium contract and it will work out fine. Probably should be * redefined to be ~0 instead of -1 but it doesn't really matter. */ - if (offsets[i] != -1) { + if (offsets[i] != -1 && targets[i] != NULL) { pipe_buffer_write(pctx, agx_so_target(targets[i])->offset, 0, 4, &offsets[i]); }