vbo: take into account the size when printing VAO elements
authorAndres Gomez <agomez@igalia.com>
Sun, 28 Jan 2018 23:35:16 +0000 (01:35 +0200)
committerAndres Gomez <agomez@igalia.com>
Tue, 6 Feb 2018 13:30:23 +0000 (15:30 +0200)
When using print_draw_arrays for debugging, we were printing an "n"
amount of vertex but that meant not to print all the size in the "n"
vertex, depending on the stride used.

Now we print the whole size in the "n" vertex.

Cc: Mathias Fröhlich <mathias.froehlich@web.de>
Cc: Brian Paul <brianp@vmware.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
src/mesa/vbo/vbo_exec_array.c

index 608ddaac47af0ad8ccc05a1a4f5bc97ce5e3cb1f..74b9a1b0ebd0de709748d20dcd81694fdeb93f87 100644 (file)
@@ -287,7 +287,7 @@ print_draw_arrays(struct gl_context *ctx,
          float *f = (float *) (p + offset);
          int *k = (int *) f;
         int i = 0;
-         int n = (count * binding->Stride) / 4;
+        int n = (count - 1) * (binding->Stride / 4) + array->Size;
          if (n > 32)
             n = 32;
          printf("  Data at offset %d:\n", offset);