diff options
Diffstat (limited to 'src/mesa/main/draw.c')
-rw-r--r-- | src/mesa/main/draw.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c index 53946a72b20..a33862f517b 100644 --- a/src/mesa/main/draw.c +++ b/src/mesa/main/draw.c @@ -72,7 +72,7 @@ check_array_data(struct gl_context *ctx, struct gl_vertex_array_object *vao, &vao->BufferBinding[array->BufferBindingIndex]; struct gl_buffer_object *bo = binding->BufferObj; const void *data = array->Ptr; - if (_mesa_is_bufferobj(bo)) { + if (bo) { data = ADD_POINTERS(_mesa_vertex_attrib_address(array, binding), bo->Mappings[MAP_INTERNAL].Pointer); } @@ -133,7 +133,7 @@ check_draw_elements_data(struct gl_context *ctx, GLsizei count, _mesa_vao_map(ctx, vao, GL_MAP_READ_BIT); - if (_mesa_is_bufferobj(vao->IndexBufferObj)) + if (vao->IndexBufferObj) elements = ADD_POINTERS(vao->IndexBufferObj->Mappings[MAP_INTERNAL].Pointer, elements); @@ -257,7 +257,7 @@ print_draw_arrays(struct gl_context *ctx, array->Format.Size, binding->Stride, array->Ptr, bufObj ? bufObj->Name : 0); - if (_mesa_is_bufferobj(bufObj)) { + if (bufObj) { GLubyte *p = bufObj->Mappings[MAP_INTERNAL].Pointer; int offset = (int) (GLintptr) _mesa_vertex_attrib_address(array, binding); @@ -751,7 +751,7 @@ skip_draw_elements(struct gl_context *ctx, GLsizei count, /* Not using a VBO for indices, so avoid NULL pointer derefs later. */ - if (!_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj) && indices == NULL) + if (!ctx->Array.VAO->IndexBufferObj && indices == NULL) return true; if (skip_validated_draw(ctx)) @@ -1226,7 +1226,7 @@ _mesa_validated_multidrawelements(struct gl_context *ctx, GLenum mode, * subranges of the index buffer as one large index buffer may lead to * us reading unmapped memory. */ - if (!_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj)) + if (!ctx->Array.VAO->IndexBufferObj) fallback = GL_TRUE; } @@ -1542,7 +1542,7 @@ _mesa_exec_DrawArraysIndirect(GLenum mode, const GLvoid *indirect) * pointer passed as their <indirect> parameters." */ if (ctx->API == API_OPENGL_COMPAT && - !_mesa_is_bufferobj(ctx->DrawIndirectBuffer)) { + !ctx->DrawIndirectBuffer) { DrawArraysIndirectCommand *cmd = (DrawArraysIndirectCommand *) indirect; _mesa_exec_DrawArraysInstancedBaseInstance(mode, cmd->first, cmd->count, @@ -1589,14 +1589,14 @@ _mesa_exec_DrawElementsIndirect(GLenum mode, GLenum type, const GLvoid *indirect * pointer passed as their <indirect> parameters." */ if (ctx->API == API_OPENGL_COMPAT && - !_mesa_is_bufferobj(ctx->DrawIndirectBuffer)) { + !ctx->DrawIndirectBuffer) { /* * Unlike regular DrawElementsInstancedBaseVertex commands, the indices * may not come from a client array and must come from an index buffer. * If no element array buffer is bound, an INVALID_OPERATION error is * generated. */ - if (!_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj)) { + if (!ctx->Array.VAO->IndexBufferObj) { _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawElementsIndirect(no buffer bound " "to GL_ELEMENT_ARRAY_BUFFER)"); @@ -1661,7 +1661,7 @@ _mesa_exec_MultiDrawArraysIndirect(GLenum mode, const GLvoid *indirect, * pointer passed as their <indirect> parameters." */ if (ctx->API == API_OPENGL_COMPAT && - !_mesa_is_bufferobj(ctx->DrawIndirectBuffer)) { + !ctx->DrawIndirectBuffer) { if (!_mesa_valid_draw_indirect_multi(ctx, primcount, stride, "glMultiDrawArraysIndirect")) @@ -1730,14 +1730,14 @@ _mesa_exec_MultiDrawElementsIndirect(GLenum mode, GLenum type, * pointer passed as their <indirect> parameters." */ if (ctx->API == API_OPENGL_COMPAT && - !_mesa_is_bufferobj(ctx->DrawIndirectBuffer)) { + !ctx->DrawIndirectBuffer) { /* * Unlike regular DrawElementsInstancedBaseVertex commands, the indices * may not come from a client array and must come from an index buffer. * If no element array buffer is bound, an INVALID_OPERATION error is * generated. */ - if (!_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj)) { + if (!ctx->Array.VAO->IndexBufferObj) { _mesa_error(ctx, GL_INVALID_OPERATION, "glMultiDrawElementsIndirect(no buffer bound " "to GL_ELEMENT_ARRAY_BUFFER)"); |