From e4c700dbbf2a802f32bf62256c801105998c3729 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 21 Oct 2009 19:55:44 -0600 Subject: mesa: added MESA_FORMAT_X8_Z24 format 24-bit Z in 32-bit pixel. We could probably use the MESA_FORMAT_S8_Z24 format but this there's a few places where we explicitly don't want stencil. This format may go away at some point in the future. --- src/mesa/main/formats.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/mesa/main/formats.c') diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index 2924ab69cc..45ac39a818 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -290,6 +290,14 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 0, 0, 0, 16, 0, /* Lum/Int/Index/Depth/StencilBits */ 1, 1, 2 /* BlockWidth/Height,Bytes */ }, + { + MESA_FORMAT_X8_Z24, /* Name */ + GL_DEPTH_COMPONENT, /* BaseFormat */ + GL_UNSIGNED_INT, /* DataType */ + 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */ + 0, 0, 0, 24, 0, /* Lum/Int/Index/Depth/StencilBits */ + 1, 1, 4 /* BlockWidth/Height,Bytes */ + }, { MESA_FORMAT_Z32, /* Name */ GL_DEPTH_COMPONENT, /* BaseFormat */ @@ -873,6 +881,11 @@ _mesa_format_to_type_and_comps(gl_format format, *comps = 1; return; + case MESA_FORMAT_X8_Z24: + *datatype = GL_UNSIGNED_INT; + *comps = 1; + return; + case MESA_FORMAT_Z32: *datatype = GL_UNSIGNED_INT; *comps = 1; -- cgit v1.2.3