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 <[email protected]>
Cc: Brian Paul <[email protected]>
Signed-off-by: Andres Gomez <[email protected]>
---
 src/mesa/vbo/vbo_exec_array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index aa5f3cbf23e..e80c5baaf79 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -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);
-- 
2.15.1

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

Reply via email to