diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index d10fabb62dd..034d77d2bb7 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -2760,9 +2760,8 @@ panfrost_launch_xfb(struct panfrost_batch *batch, /* TODO: XFB with index buffers */ // assert(info->index_size == 0); - u_trim_pipe_prim(info->mode, &count); - if (count == 0) + if (!u_trim_pipe_prim(info->mode, &count)) return; perf_debug(batch->ctx, "Emulating transform feedback");