[Mesa-dev] [PATCH 04/22] glformats: Add depth without stencil mapping for GL_UNSIGNED_INT_24_8

Chris Wilson chris at chris-wilson.co.uk
Sat Aug 5 09:39:56 UTC 2017


Map format=GL_UNSIGNED_INT_24_8, type=GL_DEPTH_COMPONENT to
MESA_FORMAT_Z24_UNORM_x8_UINT.
---
 src/mesa/main/glformats.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 8ae833ca65..731934df6d 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -3625,6 +3625,8 @@ _mesa_format_from_format_and_type(GLenum format, GLenum type)
    case GL_UNSIGNED_INT_24_8:
       if (format == GL_DEPTH_STENCIL)
          return MESA_FORMAT_Z24_UNORM_S8_UINT;
+      if (format == GL_DEPTH_COMPONENT)
+         return MESA_FORMAT_Z24_UNORM_X8_UINT;
       break;
    case GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
       if (format == GL_DEPTH_STENCIL)
-- 
2.13.3



More information about the mesa-dev mailing list