mesa: Fix depth/stencil ordering in _mesa_format_from_format_and_type().
authorEric Anholt <eric@anholt.net>
Tue, 17 Sep 2019 21:54:48 +0000 (14:54 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 17 Oct 2019 21:07:29 +0000 (21:07 +0000)
The GL spec says the 24-bit component is in the high bits, and
format_unpack.c looks at the high 24 bits in the S8Z24 case, not
Z24SS8.

Avoids a regression in the next commit.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/glformats.c

index 7df261893593fe26f286d86dd4687577426bca5c..3ab06456e8bb32b083a210803c3f1f7667ebe521 100644 (file)
@@ -3737,7 +3737,7 @@ _mesa_format_from_format_and_type(GLenum format, GLenum type)
       break;
    case GL_UNSIGNED_INT_24_8:
       if (format == GL_DEPTH_STENCIL)
-         return MESA_FORMAT_Z24_UNORM_S8_UINT;
+         return MESA_FORMAT_S8_UINT_Z24_UNORM;
       break;
    case GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
       if (format == GL_DEPTH_STENCIL)