summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-03-21 12:32:48 -0600
committerBrian <[email protected]>2008-03-21 12:32:48 -0600
commitc80a380ebb58c15db87309d466ef57fb006b40ae (patch)
treee0c8002d48c53dd12067365c7fa2ef1c5419b3b3 /src/mesa/main
parentb70a6babfbc035d64dbe35ac4bf9218e8232b435 (diff)
Fix some PBO breakage.
In _mesa_Bitmap, can't early return if bitmap ptr is NULL, it may be an offset into a PBO. Similarly for _mesa_GetTexImage.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/drawpix.c14
-rw-r--r--src/mesa/main/teximage.c3
2 files changed, 6 insertions, 11 deletions
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index ae9c7e29a15..5df55ef0c9e 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 7.1
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -343,12 +343,10 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
}
if (ctx->RenderMode == GL_RENDER) {
- if (bitmap && width && height) {
- /* Truncate, to satisfy conformance tests (matches SGI's OpenGL). */
- GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig);
- GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig);
- ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
- }
+ /* Truncate, to satisfy conformance tests (matches SGI's OpenGL). */
+ GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig);
+ GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig);
+ ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
}
#if _HAVE_FULL_GL
else if (ctx->RenderMode == GL_FEEDBACK) {
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index f15e4045278..384e1455203 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2323,9 +2323,6 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
return;
}
- if (!pixels)
- return;
-
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_select_tex_image(ctx, texObj, target, level);