summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorAndres Gomez <[email protected]>2018-01-29 01:35:16 +0200
committerAndres Gomez <[email protected]>2018-02-06 15:30:23 +0200
commit0057ae40380d97598bc01c3a863525d7e9eafbe9 (patch)
treef6af8266fc89d4135975d2bac540ad99c16c4383 /src/mesa
parentc9325b4fa961fda24c7f3c30c153a0d3896fa64f (diff)
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 <[email protected]> Cc: Brian Paul <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 608ddaac47a..74b9a1b0ebd 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);