mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-27 14:10:25 +01:00
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:
parent
34b2f00d9c
commit
e59fb5130a
2 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 *)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue