From 581f6fb7c8fd37104eb8921bc13f9227d2e763e2 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 11 Aug 2023 07:24:58 -0400 Subject: [PATCH] u/draw: skip zero-sized indirect draws cc: mesa-stable Acked-by: Dave Airlie Part-of: --- src/gallium/auxiliary/util/u_draw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/auxiliary/util/u_draw.c b/src/gallium/auxiliary/util/u_draw.c index 683c9c1..454aff7 100644 --- a/src/gallium/auxiliary/util/u_draw.c +++ b/src/gallium/auxiliary/util/u_draw.c @@ -223,6 +223,9 @@ util_draw_indirect(struct pipe_context *pipe, pipe_buffer_unmap(pipe, dc_transfer); } + if (!draw_count) + return; + if (indirect->stride) num_params = MIN2(indirect->stride / 4, num_params); params = (uint32_t *) -- 2.7.4