diff options
-rw-r--r-- | src/mesa/main/pack.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 7147fd6e4fe..4561a6c492a 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -1074,6 +1074,21 @@ _mesa_pack_depth_span( struct gl_context *ctx, GLuint n, GLvoid *dest, } } break; + case GL_UNSIGNED_INT_24_8: + { + const GLdouble scale = (GLdouble) 0xffffff; + GLuint *dst = (GLuint *) dest; + GLuint i; + for (i = 0; i < n; i++) { + GLuint z = (GLuint) (depthSpan[i] * scale); + assert(z <= 0xffffff); + dst[i] = (z << 8); + } + if (dstPacking->SwapBytes) { + _mesa_swap4( (GLuint *) dst, n ); + } + break; + } case GL_UNSIGNED_INT: { GLuint *dst = (GLuint *) dest; |