Hello Marek,

go ahead.

This is:
Tested-by: Alexandre Demers <[email protected]>
Tested-by: Dieter Nützel <[email protected]>

Solve:
https://bugs.freedesktop.org/show_bug.cgi?id=102502

Dieter

Am 07.09.2017 00:37, schrieb Marek Olšák:
Ping.

On Sat, Sep 2, 2017 at 1:34 AM, Marek Olšák <[email protected]> wrote:
From: Marek Olšák <[email protected]>

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102502

Cc: 17.2 <[email protected]>
---
 src/mesa/state_tracker/st_draw.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index fe03a4a..2fe7070 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -191,23 +191,28 @@ st_draw_vbo(struct gl_context *ctx,
       if (tfb_vertcount) {
if (!st_transform_feedback_draw_init(tfb_vertcount, stream, &info))
             return;
       }
    }

    assert(!indirect);

    /* 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;
       info.drawid = prims[i].draw_id;
       if (!ib) {
          info.min_index = info.start;
          info.max_index = info.start + info.count - 1;
       }

       if (ST_DEBUG & DEBUG_DRAW) {
--
2.7.4

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to