From f59e5ee5fbae221bb873151d2e5f322d5b9635d4 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 22 Apr 2024 13:37:11 +0200 Subject: [PATCH] panfrost: check return-value from u_trim_pipe_prim This is slightly cleaner than what we currently do. It shouldn't matter in difference, though. CID: 1515978 Reviewed-by: Boris Brezillon Part-of: --- src/gallium/drivers/panfrost/pan_cmdstream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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");