diff options
author | Marek Olšák <[email protected]> | 2017-09-01 23:27:35 +0200 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-09-13 21:34:02 +0100 |
commit | 0e305f0518eff6d12bfaedd27e12db1223b20757 (patch) | |
tree | 9946639e023d733c7a2b2507d86ab7e21950b702 | |
parent | cb9dae484a9e96afef0b9f3b1ffa5939f96a9171 (diff) |
st/mesa: skip draw calls with pipe_draw_info::count == 0
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102502
Cc: 17.2 <[email protected]>
Tested-by: Alexandre Demers <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Acked-by: Timothy Arceri <[email protected]>
(cherry picked from commit e4018fdd85d8b58250c2cff8cdf4edd6b2b3c70b)
-rw-r--r-- | src/mesa/state_tracker/st_draw.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index fe03a4a587e..2fe7070bcae 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -198,9 +198,14 @@ st_draw_vbo(struct gl_context *ctx, /* do actual drawing */ for (i = 0; i < nr_prims; i++) { + info.count = prims[i].count; + + /* Skip no-op draw calls. */ + if (!info.count && !tfb_vertcount) + continue; + info.mode = translate_prim(ctx, prims[i].mode); info.start = start + prims[i].start; - info.count = prims[i].count; info.start_instance = prims[i].base_instance; info.instance_count = prims[i].num_instances; info.index_bias = prims[i].basevertex; |