summaryrefslogtreecommitdiff
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-03-21 14:19:28 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-03-21 14:19:28 -0600
commitd933be6baf98624c609d422a9b083a08f67e8bdb (patch)
treed262e8c7962f6105f44bb6f6b5cb4e05f412bd9e /src/mesa/swrast
parent3c9862d337244e305dc39bdd0a48e254c9766ec8 (diff)
Refactor PBO validate/map code.
We always need to do PBO validation, so do that in core Mesa before calling driver routine.
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.c8
3 files changed, 7 insertions, 12 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 09ff96fd32..81f5caa270 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -839,8 +839,7 @@ _swrast_DrawPixels( GLcontext *ctx,
if (swrast->NewState)
_swrast_validate_derived( ctx );
- pixels = _mesa_validate_and_map_drawpix_pbo(ctx, 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 050506b0d0..9140d12ea0 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -574,11 +574,9 @@ _swrast_ReadPixels( GLcontext *ctx,
return;
}
- pixels = _mesa_validate_and_map_readpix_pbo(ctx, x, y, width, height,
- format, type,
- &clippedPacking, pixels);
- if (!pixels)
- return;
+ pixels = _mesa_map_readpix_pbo(ctx, &clippedPacking, pixels);
+ if (!pixels)
+ return;
switch (format) {
case GL_COLOR_INDEX: