diff options
author | Nick Bowler <[email protected]> | 2010-08-26 17:52:30 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-08-27 14:31:00 -0600 |
commit | f57df7f2130dfe20a6f7e75cfc1f5d4e1717d098 (patch) | |
tree | f239e48ff9c188d295106484e914b8a1c4d0d954 /src/mesa/main/formats.c | |
parent | 579fce252413f39830ee379076fddf0580ea9b16 (diff) |
mesa: Use the format info to identify packed depth/stencil formats.
Due to a misunderstanding of the Z24_X8 and X8_Z24 formats, the earlier
patch created depth/stencil wrappers for them. This broke swrast.
Use the format info instead, which only identifies Z24_S8 and S8_Z24 as
packed depth/stencil. It also has the advantage of being nicer code.
Signed-off-by: Nick Bowler <[email protected]>
Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/formats.c')
-rw-r--r-- | src/mesa/main/formats.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index c5f3e0b21d1..112d7a00883 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -945,13 +945,9 @@ _mesa_is_format_compressed(gl_format format) GLboolean _mesa_is_format_packed_depth_stencil(gl_format format) { - if (format == MESA_FORMAT_Z24_S8 - || format == MESA_FORMAT_Z24_X8 - || format == MESA_FORMAT_S8_Z24 - || format == MESA_FORMAT_X8_Z24) - return GL_TRUE; + const struct gl_format_info *info = _mesa_get_format_info(format); - return GL_FALSE; + return info->BaseFormat == GL_DEPTH_STENCIL; } |