diff options
author | Brian Paul <[email protected]> | 2009-10-21 19:55:44 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-10-21 19:55:44 -0600 |
commit | e4c700dbbf2a802f32bf62256c801105998c3729 (patch) | |
tree | 5929e808cd77e8f5dc5aeb36f019a0a21b6016b8 /src/mesa/main/formats.c | |
parent | fa3046431a0da5990043fd4856602b0ba57ff9af (diff) |
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.
Diffstat (limited to 'src/mesa/main/formats.c')
-rw-r--r-- | src/mesa/main/formats.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index 2924ab69cc4..45ac39a8189 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -291,6 +291,14 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 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 */ GL_UNSIGNED_INT, /* DataType */ @@ -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; |