From 1b448c7a5cafa68eeead2a4c45f4362a9883383b Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 3 Sep 2009 11:29:18 -0600 Subject: mesa: consolidate PBO map/unmap helpers Instead of _mesa_map_readpix_pbo() use _mesa_map_pbo_source(). Instead of _mesa_map_drawpix_pbo() and _mesa_map_bitmap_pbo() use _mesa_map_pbo_dest(). --- src/mesa/swrast/s_bitmap.c | 4 ++-- src/mesa/swrast/s_drawpix.c | 4 ++-- src/mesa/swrast/s_readpix.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/mesa/swrast') diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c index 5e7822cf32..3dbdf2a61a 100644 --- a/src/mesa/swrast/s_bitmap.c +++ b/src/mesa/swrast/s_bitmap.c @@ -56,7 +56,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, ASSERT(ctx->RenderMode == GL_RENDER); - bitmap = _mesa_map_bitmap_pbo(ctx, unpack, bitmap); + bitmap = (const GLubyte *) _mesa_map_pbo_source(ctx, unpack, bitmap); if (!bitmap) return; @@ -133,7 +133,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, swrast_render_finish(ctx); - _mesa_unmap_bitmap_pbo(ctx, unpack); + _mesa_unmap_pbo_source(ctx, unpack); } diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index a9ef8e685f..d31c402eea 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -847,7 +847,7 @@ _swrast_DrawPixels( GLcontext *ctx, if (swrast->NewState) _swrast_validate_derived( ctx ); - pixels = _mesa_map_drawpix_pbo(ctx, unpack, pixels); + pixels = _mesa_map_pbo_source(ctx, unpack, pixels); if (!pixels) { swrast_render_finish(ctx); _mesa_set_vp_override(ctx, save_vp_override); @@ -892,7 +892,7 @@ _swrast_DrawPixels( GLcontext *ctx, swrast_render_finish(ctx); _mesa_set_vp_override(ctx, save_vp_override); - _mesa_unmap_drawpix_pbo(ctx, unpack); + _mesa_unmap_pbo_source(ctx, unpack); } diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index e901fc6b5d..48b9408d24 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -574,7 +574,7 @@ _swrast_ReadPixels( GLcontext *ctx, return; } - pixels = _mesa_map_readpix_pbo(ctx, &clippedPacking, pixels); + pixels = _mesa_map_pbo_dest(ctx, &clippedPacking, pixels); if (!pixels) return; @@ -616,5 +616,5 @@ _swrast_ReadPixels( GLcontext *ctx, swrast_render_finish(ctx); - _mesa_unmap_readpix_pbo(ctx, &clippedPacking); + _mesa_unmap_pbo_dest(ctx, &clippedPacking); } -- cgit v1.2.3