asahi: be robust about null xfb

fixes arb_enhanced_layouts-transform-feedback-layout-qualifiers tests.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
This commit is contained in:
Alyssa Rosenzweig
2023-11-20 08:24:45 -04:00
parent 3ac44d8c5e
commit 683dac24b2
+1 -1
View File
@@ -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]);
}