summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/api_validate.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2011-08-21 18:34:27 -0700
committerIan Romanick <ian.d.romanick@intel.com>2011-08-23 14:52:11 -0700
commit28249bd260f4c52badf3eb61ade2744604b21bca (patch)
treef9b85dee32fed632243ecfd72bde53d6e99b0231 /src/mesa/main/api_validate.c
parentcccc7412c22a704d85203d7bb9c8e73d45cccf49 (diff)
downloadexternal_mesa3d-28249bd260f4c52badf3eb61ade2744604b21bca.zip
external_mesa3d-28249bd260f4c52badf3eb61ade2744604b21bca.tar.gz
external_mesa3d-28249bd260f4c52badf3eb61ade2744604b21bca.tar.bz2
mesa: Eliminate dd_function_table::MapBuffer
Replace all calls to dd_function_table::MapBuffer with appropriate calls to dd_function_table::MapBufferRange, then remove all the cruft. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r--src/mesa/main/api_validate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 507d0ce..699b414 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -65,7 +65,8 @@ _mesa_max_buffer_index(struct gl_context *ctx, GLuint count, GLenum type,
if (_mesa_is_bufferobj(elementBuf)) {
/* elements are in a user-defined buffer object. need to map it */
- map = ctx->Driver.MapBuffer(ctx, GL_READ_ONLY, elementBuf);
+ map = ctx->Driver.MapBufferRange(ctx, 0, elementBuf->Size,
+ GL_MAP_READ_BIT, elementBuf);
/* Actual address is the sum of pointers */
indices = (const GLvoid *) ADD_POINTERS(map, (const GLubyte *) indices);
}