mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
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>
This commit is contained in:
parent
15fb88e912
commit
0de9265b1f
1 changed files with 4 additions and 5 deletions
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue