diff options
author | Tapani Pälli <[email protected]> | 2015-10-08 09:43:41 +0300 |
---|---|---|
committer | Tapani Pälli <[email protected]> | 2015-10-09 09:11:14 +0300 |
commit | d8d0e4a81e42678cc8c8b876dfee24d5c2f4ba38 (patch) | |
tree | 43b927881c664882d8ba31117fcd698ce692c8c4 /src | |
parent | 7d7dd1871174905dfdd3ca874a09d9d7837ac743 (diff) |
mesa: add GL_UNSIGNED_INT_24_8 to _mesa_pack_depth_span
Patch adds missing type (used with NV_read_depth) so that it gets
handled correctly. This fixes errors seen with following CTS test:
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
Cc: "11.0" <[email protected]>
Diffstat (limited to 'src')
-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 00e31b05c99..89faf515443 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -1073,6 +1073,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; |