summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-04-07 17:31:14 -0600
committerBrian Paul <[email protected]>2009-04-07 17:31:14 -0600
commitac1ff1b9fe19077e53ff4cd14a1b083232c8bf72 (patch)
tree9dd56786fb4146b599340f4d4dd9ba3d14ab0ad2 /src
parent228f20e324249ef25beed725a6a821e0bd0cc232 (diff)
mesa: add another special/optimized case in _mesa_unpack_depth_span()
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/image.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 5cb110f3a5d..ddae456fa12 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -4546,6 +4546,17 @@ _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n,
}
return;
}
+ if (srcType == GL_UNSIGNED_INT_24_8
+ && dstType == GL_UNSIGNED_INT
+ && depthMax == 0xffffff) {
+ const GLuint *src = (const GLuint *) source;
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = src[i] >> 8;
+ }
+ return;
+ }
/* XXX may want to add additional cases here someday */
}