aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/pack.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-08 11:05:14 +0200
committermarha <marha@users.sourceforge.net>2011-09-08 11:05:14 +0200
commit32071a97fb69e2cb5a5dc86016b181a5afd2a87b (patch)
tree23a05e63a91e56c1c97a3c7b991e3acf46893e2f /mesalib/src/mesa/main/pack.c
parent553aee48675d816bf041a61ab01bb73f8602d365 (diff)
parent23a7aebae0a742d94ffe2304357dcc1234a99155 (diff)
downloadvcxsrv-32071a97fb69e2cb5a5dc86016b181a5afd2a87b.tar.gz
vcxsrv-32071a97fb69e2cb5a5dc86016b181a5afd2a87b.tar.bz2
vcxsrv-32071a97fb69e2cb5a5dc86016b181a5afd2a87b.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/docs/relnotes.html mesalib/scons/gallium.py mesalib/src/mesa/drivers/common/driverfuncs.c mesalib/src/mesa/main/colortab.c mesalib/src/mesa/main/dd.h mesalib/src/mesa/main/enable.c mesalib/src/mesa/main/formats.c mesalib/src/mesa/main/framebuffer.c mesalib/src/mesa/main/get.c mesalib/src/mesa/main/mtypes.h mesalib/src/mesa/main/pack.c mesalib/src/mesa/main/texgetimage.c mesalib/src/mesa/main/teximage.c mesalib/src/mesa/main/texobj.c mesalib/src/mesa/main/texparam.c mesalib/src/mesa/main/texstate.c mesalib/src/mesa/swrast/s_drawpix.c mesalib/src/mesa/vbo/vbo_attrib_tmp.h
Diffstat (limited to 'mesalib/src/mesa/main/pack.c')
-rw-r--r--mesalib/src/mesa/main/pack.c52
1 files changed, 12 insertions, 40 deletions
diff --git a/mesalib/src/mesa/main/pack.c b/mesalib/src/mesa/main/pack.c
index 817d92912..1f9df52c4 100644
--- a/mesalib/src/mesa/main/pack.c
+++ b/mesalib/src/mesa/main/pack.c
@@ -3459,8 +3459,7 @@ _mesa_unpack_color_span_chan( struct gl_context *ctx,
dstFormat == GL_RED ||
dstFormat == GL_RG ||
dstFormat == GL_RGB ||
- dstFormat == GL_RGBA ||
- dstFormat == GL_COLOR_INDEX);
+ dstFormat == GL_RGBA);
ASSERT(srcFormat == GL_RED ||
srcFormat == GL_GREEN ||
@@ -3646,24 +3645,11 @@ _mesa_unpack_color_span_chan( struct gl_context *ctx,
extract_uint_indexes(n, indexes, srcFormat, srcType, source,
srcPacking);
- if (dstFormat == GL_COLOR_INDEX) {
- GLuint i;
- _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
- /* convert to GLchan and return */
- for (i = 0; i < n; i++) {
- dest[i] = (GLchan) (indexes[i] & 0xff);
- }
- free(indexes);
- free(rgba);
- return;
- }
- else {
- /* Convert indexes to RGBA */
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- _mesa_shift_and_offset_ci(ctx, n, indexes);
- }
- _mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
- }
+ /* Convert indexes to RGBA */
+ if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+ _mesa_shift_and_offset_ci(ctx, n, indexes);
+ }
+ _mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
/* Don't do RGBA scale/bias or RGBA->RGBA mapping if starting
* with color indexes.
@@ -3773,8 +3759,7 @@ _mesa_unpack_color_span_float( struct gl_context *ctx,
dstFormat == GL_RED ||
dstFormat == GL_RG ||
dstFormat == GL_RGB ||
- dstFormat == GL_RGBA ||
- dstFormat == GL_COLOR_INDEX);
+ dstFormat == GL_RGBA);
ASSERT(srcFormat == GL_RED ||
srcFormat == GL_GREEN ||
@@ -3855,24 +3840,11 @@ _mesa_unpack_color_span_float( struct gl_context *ctx,
extract_uint_indexes(n, indexes, srcFormat, srcType, source,
srcPacking);
- if (dstFormat == GL_COLOR_INDEX) {
- GLuint i;
- _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
- /* convert to GLchan and return */
- for (i = 0; i < n; i++) {
- dest[i] = (GLchan) (indexes[i] & 0xff);
- }
- free(indexes);
- free(rgba);
- return;
- }
- else {
- /* Convert indexes to RGBA */
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- _mesa_shift_and_offset_ci(ctx, n, indexes);
- }
- _mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
- }
+ /* Convert indexes to RGBA */
+ if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+ _mesa_shift_and_offset_ci(ctx, n, indexes);
+ }
+ _mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
/* Don't do RGBA scale/bias or RGBA->RGBA mapping if starting
* with color indexes.