diff options
author | Brian <[email protected]> | 2008-03-21 12:31:21 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2008-03-21 12:33:28 -0600 |
commit | 85ea7ff25cec703a00d79246df49a4ae6192c395 (patch) | |
tree | 4e80886d8eb7f7b2afd6c1cf536100571a565aaf /src/mesa/main/drawpix.c | |
parent | 7936c614abc165270852bc5e7e316747a9cacdfb (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/drawpix.c')
-rw-r--r-- | src/mesa/main/drawpix.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index a001cf172c7..d9b724bc06d 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"), @@ -340,12 +340,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) { |