u/draw: skip zero-sized indirect draws

cc: mesa-stable

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24631>
(cherry picked from commit 581f6fb7c8)
This commit is contained in:
Mike Blumenkrantz 2023-08-11 07:24:58 -04:00 committed by Dylan Baker
parent 34b2f00d9c
commit e59fb5130a
2 changed files with 4 additions and 1 deletions

View file

@ -6714,7 +6714,7 @@
"description": "u/draw: skip zero-sized indirect draws",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -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 *)