summaryrefslogtreecommitdiff
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-03-21 14:20:07 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-03-21 14:20:07 -0600
commita39091bc5b68e4d4f5302f1d3f1a138798f54b77 (patch)
tree8b83b941634753a0b41d27716ae27bd961ad4343 /src/mesa/swrast
parentf1626f0bfd2b14ad8ca2afaad2ea8afb539e6491 (diff)
Refactor PBO validate/map code.
We always need to do PBO validation, so do that in core Mesa before calling driv er routine. cherry-picked from Mesa/master.
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_bitmap.c8
-rw-r--r--src/mesa/swrast/s_drawpix.c3
-rw-r--r--src/mesa/swrast/s_readpix.c4
3 files changed, 5 insertions, 10 deletions
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c
index 17f639fd55..f3dda12e25 100644
--- a/src/mesa/swrast/s_bitmap.c
+++ b/src/mesa/swrast/s_bitmap.c
@@ -57,11 +57,9 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
ASSERT(ctx->RenderMode == GL_RENDER);
- bitmap = _mesa_validate_and_map_bitmap_pbo(ctx, width, height,
- unpack, bitmap);
- if (!bitmap) {
- return NULL;
- }
+ bitmap = _mesa_map_bitmap_pbo(ctx, unpack, bitmap);
+ if (!bitmap)
+ return;
RENDER_START(swrast,ctx);
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 2cf3501274..fb04d9f746 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -834,8 +834,7 @@ _swrast_DrawPixels( GLcontext *ctx,
if (swrast->NewState)
_swrast_validate_derived( ctx );
- pixels = _mesa_validate_and_map_drawpix_pbo(ctx, x, y, width, height,
- format, type, unpack, pixels);
+ pixels = _mesa_map_drawpix_pbo(ctx, unpack, pixels);
if (!pixels)
return;
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index f4f882ae84..2f155d0b70 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -572,9 +572,7 @@ _swrast_ReadPixels( GLcontext *ctx,
goto end;
}
- pixels = _mesa_validate_and_map_readpix_pbo(ctx, x, y, width, height,
- format, type,
- &clippedPacking, pixels);
+ pixels = _mesa_map_readpix_pbo(ctx, &clippedPacking, pixels);
if (!pixels)
return;