mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
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 <tapani.palli@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit d8d0e4a81e)
This commit is contained in:
parent
3f802ebaf8
commit
41cc0965bb
1 changed files with 15 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue