summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/xm_dd.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-08-21 18:34:27 -0700
committerIan Romanick <[email protected]>2011-08-23 14:52:11 -0700
commit28249bd260f4c52badf3eb61ade2744604b21bca (patch)
treef9b85dee32fed632243ecfd72bde53d6e99b0231 /src/mesa/drivers/x11/xm_dd.c
parentcccc7412c22a704d85203d7bb9c8e73d45cccf49 (diff)
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 <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/x11/xm_dd.c')
-rw-r--r--src/mesa/drivers/x11/xm_dd.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index fe00bdd520d..3a5d0ae04fc 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -454,9 +454,10 @@ xmesa_DrawPixels_8R8G8B( struct gl_context *ctx,
"glDrawPixels(invalid PBO access)");
return;
}
- buf = (GLubyte *) ctx->Driver.MapBuffer(ctx,
- GL_READ_ONLY_ARB,
- unpack->BufferObj);
+ buf = (GLubyte *) ctx->Driver.MapBufferRange(ctx, 0,
+ unpack->BufferObj->Size,
+ GL_MAP_READ_BIT,
+ unpack->BufferObj);
if (!buf) {
/* buffer is already mapped - that's an error */
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -587,10 +588,10 @@ xmesa_DrawPixels_5R6G5B( struct gl_context *ctx,
"glDrawPixels(invalid PBO access)");
return;
}
- buf = (GLubyte *) ctx->Driver.MapBuffer(ctx,
- GL_PIXEL_UNPACK_BUFFER_EXT,
- GL_READ_ONLY_ARB,
- unpack->BufferObj);
+ buf = (GLubyte *) ctx->Driver.MapBufferRange(ctx, 0
+ unpack->BufferObj->Size,
+ GL_MAP_READ_BIT,
+ unpack->BufferObj);
if (!buf) {
/* buffer is already mapped - that's an error */
_mesa_error(ctx, GL_INVALID_OPERATION,