summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/dlist.c
diff options
context:
space:
mode:
authorEduardo Lima Mitev <elima@igalia.com>2014-10-21 19:11:41 +0200
committerIago Toral Quiroga <itoral@igalia.com>2015-01-12 11:20:29 +0100
commit87c595c17b9cf8277c0483389204ff82525f65cf (patch)
tree4293f7bab9ebf53dfb8ed2d4ab604a2142f0c867 /src/mesa/main/dlist.c
parentea79ab3e8c3766c17d3080e846b815d48c249186 (diff)
downloadexternal_mesa3d-87c595c17b9cf8277c0483389204ff82525f65cf.zip
external_mesa3d-87c595c17b9cf8277c0483389204ff82525f65cf.tar.gz
external_mesa3d-87c595c17b9cf8277c0483389204ff82525f65cf.tar.bz2
mesa: Replace _mesa_unpack_bitmap with _mesa_unpack_image()
_mesa_unpack_bitmap() was introduced by commit 02b801c to handle the case when data is stored in PBO by display lists, in the context of this bug: Incorrect pixels read back if draw bitmap texture through Display list https://bugs.freedesktop.org/show_bug.cgi?id=10370 Since _mesa_unpack_image() already handles the case of GL_BITMAP, this patch removes _mesa_unpack_bitmap() and makes affected calls go through _mesa_unapck_image() instead. The sample test attached to the original bug report passes with this change and there are no piglit regressions. Signed-off-by: Eduardo Lima Mitev <elima@igalia.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Diffstat (limited to 'src/mesa/main/dlist.c')
-rw-r--r--src/mesa/main/dlist.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index d297f51..06a038a 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -957,11 +957,8 @@ unpack_image(struct gl_context *ctx, GLuint dimensions,
/* no PBO */
GLvoid *image;
- if (type == GL_BITMAP)
- image = _mesa_unpack_bitmap(width, height, pixels, unpack);
- else
- image = _mesa_unpack_image(dimensions, width, height, depth,
- format, type, pixels, unpack);
+ image = _mesa_unpack_image(dimensions, width, height, depth,
+ format, type, pixels, unpack);
if (pixels && !image) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "display list construction");
}
@@ -983,11 +980,8 @@ unpack_image(struct gl_context *ctx, GLuint dimensions,
}
src = ADD_POINTERS(map, pixels);
- if (type == GL_BITMAP)
- image = _mesa_unpack_bitmap(width, height, src, unpack);
- else
- image = _mesa_unpack_image(dimensions, width, height, depth,
- format, type, src, unpack);
+ image = _mesa_unpack_image(dimensions, width, height, depth,
+ format, type, src, unpack);
ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj, MAP_INTERNAL);