summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-03-21 12:32:29 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-03-21 12:32:29 -0600
commit39ac6b04811ddf22cae95e3e1ee1dccdcb4f2007 (patch)
tree1f382197ebca68a7669cc2dfa2fc8972ab06a156
parent46cc4854e9f781e83556063981d824fad0651eea (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.
-rw-r--r--docs/relnotes-7.0.3.html2
-rw-r--r--src/mesa/main/drawpix.c14
-rw-r--r--src/mesa/main/teximage.c3
3 files changed, 8 insertions, 11 deletions
diff --git a/docs/relnotes-7.0.3.html b/docs/relnotes-7.0.3.html
index a2a3437442..6b7abeae68 100644
--- a/docs/relnotes-7.0.3.html
+++ b/docs/relnotes-7.0.3.html
@@ -40,6 +40,8 @@ Mesa 7.0.3 is a stable release with bug fixes since version 7.0.2.
<li>Bad strings given to glProgramStringARB() didn't generate GL_INVALID_OPERATION
<li>Fixed minor point rasterization regression (bug 11016)
<li>state.texenv.color state var didn't work in GL_ARB_fragment_program (bug 14931)
+<li>glBitmap from a PBO didn't always work
+<li>glGetTexImage into a PBO didn't always work
</ul>
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index c82abccc41..3acccf0430 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.0.3
*
- * 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"),
@@ -341,12 +341,10 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
}
if (ctx->RenderMode == GL_RENDER) {
- if (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 );
- }
+ /* 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 d857a4f3a4..26d8fbc8de 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2177,9 +2177,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);