Mesa (master): vbo: take into account the size when printing VAO elements

Andres Gomez tanty at kemper.freedesktop.org
Tue Feb 6 13:30:53 UTC 2018


Module: Mesa
Branch: master
Commit: 0057ae40380d97598bc01c3a863525d7e9eafbe9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0057ae40380d97598bc01c3a863525d7e9eafbe9

Author: Andres Gomez <agomez at igalia.com>
Date:   Mon Jan 29 01:35:16 2018 +0200

vbo: take into account the size when printing VAO elements

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 at web.de>
Cc: Brian Paul <brianp at vmware.com>
Signed-off-by: Andres Gomez <agomez at igalia.com>
Reviewed-by: Mathias Fröhlich <mathias.froehlich at web.de>

---

 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 608ddaac47..74b9a1b0eb 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);




More information about the mesa-commit mailing list