summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2016-10-07 15:03:55 -0600
committerBrian Paul <brianp@vmware.com>2016-10-13 17:38:49 -0600
commit0de9265b1f10a791044342a05829b72f0cc133dc (patch)
tree1437149e824942968283e38fdfa84bf084b68018
parent15fb88e912531110f1a31ede2100910fdda2823e (diff)
downloadexternal_mesa3d-0de9265b1f10a791044342a05829b72f0cc133dc.zip
external_mesa3d-0de9265b1f10a791044342a05829b72f0cc133dc.tar.gz
external_mesa3d-0de9265b1f10a791044342a05829b72f0cc133dc.tar.bz2
vbo: simplify some code in check_draw_elements_data()
Use the 'vao' local var in more places. Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
-rw-r--r--src/mesa/vbo/vbo_exec_array.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 1425e0b..dc1ef76 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -128,11 +128,11 @@ check_draw_elements_data(struct gl_context *ctx, GLsizei count, GLenum elemType,
GLint i;
GLuint k;
- if (_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj)) {
+ if (_mesa_is_bufferobj(vao->IndexBufferObj)) {
elemMap = ctx->Driver.MapBufferRange(ctx, 0,
- ctx->Array.VAO->IndexBufferObj->Size,
+ vao->IndexBufferObj->Size,
GL_MAP_READ_BIT,
- ctx->Array.VAO->IndexBufferObj,
+ vao->IndexBufferObj,
MAP_INTERNAL);
elements = ADD_POINTERS(elements, elemMap);
}
@@ -162,8 +162,7 @@ check_draw_elements_data(struct gl_context *ctx, GLsizei count, GLenum elemType,
}
if (_mesa_is_bufferobj(vao->IndexBufferObj)) {
- ctx->Driver.UnmapBuffer(ctx, ctx->Array.VAO->IndexBufferObj,
- MAP_INTERNAL);
+ ctx->Driver.UnmapBuffer(ctx, vao->IndexBufferObj, MAP_INTERNAL);
}
for (k = 0; k < VERT_ATTRIB_MAX; k++) {