summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec_array.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-06-13 13:42:53 -0600
committerBrian Paul <[email protected]>2011-06-13 13:45:39 -0600
commit8852e35e29ff941172540e1ec7158b9259f46c3c (patch)
tree06c86615a4672df189669f3de9c5d0379763fc27 /src/mesa/vbo/vbo_exec_array.c
parente6e1864f1c6c9be46b255e390d67de10f8f39509 (diff)
vbo: minor simplification in print_draw_arrays() debug function
Diffstat (limited to 'src/mesa/vbo/vbo_exec_array.c')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 5e9b2798c43..7959337decb 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -337,7 +337,8 @@ print_draw_arrays(struct gl_context *ctx,
mode, start, count);
for (i = 0; i < 32; i++) {
- GLuint bufName = exec->array.inputs[i]->BufferObj->Name;
+ struct gl_buffer_object *bufObj = exec->array.inputs[i]->BufferObj;
+ GLuint bufName = bufObj->Name;
GLint stride = exec->array.inputs[i]->Stride;
printf("attr %2d: size %d stride %d enabled %d "
"ptr %p Bufobj %u\n",
@@ -350,9 +351,8 @@ print_draw_arrays(struct gl_context *ctx,
bufName);
if (bufName) {
- struct gl_buffer_object *buf = _mesa_lookup_bufferobj(ctx, bufName);
GLubyte *p = ctx->Driver.MapBuffer(ctx, GL_ARRAY_BUFFER_ARB,
- GL_READ_ONLY_ARB, buf);
+ GL_READ_ONLY_ARB, bufObj);
int offset = (int) (GLintptr) exec->array.inputs[i]->Ptr;
float *f = (float *) (p + offset);
int *k = (int *) f;
@@ -364,7 +364,7 @@ print_draw_arrays(struct gl_context *ctx,
for (i = 0; i < n; i++) {
printf(" float[%d] = 0x%08x %f\n", i, k[i], f[i]);
}
- ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, buf);
+ ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, bufObj);
}
}
}