summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-12-01 16:37:49 -0700
committerBrian Paul <[email protected]>2011-12-02 07:22:40 -0700
commitbbbab8de63bc95fef261447b75225bc57c5d8122 (patch)
tree688ca5daee450fa5ec0ef774cd9e301db77983a7 /src/mesa
parent01cd9a7d9292507a8c9e6cdc74ba1083248b0bf0 (diff)
mesa: remove unreachable code in _mesa_unpack_color_span_ubyte()
We checked if srcType == GL_UNSIGNED_BYTE earlier so there was no way to reach this code. This was left-over code from the GLchan removal work. Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/pack.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c
index 4754d34c646..0bd4ff19906 100644
--- a/src/mesa/main/pack.c
+++ b/src/mesa/main/pack.c
@@ -3611,70 +3611,6 @@ _mesa_unpack_color_span_ubyte(struct gl_context *ctx,
return;
}
}
- /*
- * Common situation, loading 8bit RGBA/RGB source images
- * into 16/32 bit destination. (OSMesa16/32)
- */
- else if (srcType == GL_UNSIGNED_BYTE) {
- if (dstFormat == GL_RGBA) {
- if (srcFormat == GL_RGB) {
- GLuint i;
- const GLubyte *src = (const GLubyte *) source;
- GLubyte *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = src[0];
- dst[1] = src[1];
- dst[2] = src[2];
- dst[3] = 255;
- src += 3;
- dst += 4;
- }
- return;
- }
- else if (srcFormat == GL_RGBA) {
- GLuint i;
- const GLubyte *src = (const GLubyte *) source;
- GLubyte *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = src[0];
- dst[1] = src[1];
- dst[2] = src[2];
- dst[3] = src[3];
- src += 4;
- dst += 4;
- }
- return;
- }
- }
- else if (dstFormat == GL_RGB) {
- if (srcFormat == GL_RGB) {
- GLuint i;
- const GLubyte *src = (const GLubyte *) source;
- GLubyte *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = src[0];
- dst[1] = src[1];
- dst[2] = src[2];
- src += 3;
- dst += 3;
- }
- return;
- }
- else if (srcFormat == GL_RGBA) {
- GLuint i;
- const GLubyte *src = (const GLubyte *) source;
- GLubyte *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = src[0];
- dst[1] = src[1];
- dst[2] = src[2];
- src += 4;
- dst += 3;
- }
- return;
- }
- }
- }
}