From ac1ff1b9fe19077e53ff4cd14a1b083232c8bf72 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 7 Apr 2009 17:31:14 -0600 Subject: mesa: add another special/optimized case in _mesa_unpack_depth_span() --- src/mesa/main/image.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/mesa/main') diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 5cb110f3a5..ddae456fa1 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 */ } -- cgit v1.2.3