diff options
author | Marek Olšák <[email protected]> | 2011-05-28 15:50:10 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-05-30 10:49:31 +0200 |
commit | 6c638b7ca1109e9ec0f16e6c13e08928b4d05b23 (patch) | |
tree | eb30404a7c01d53a166e2ca5af665d76bc0afcc4 /src/mesa | |
parent | 26d718ff71e6d9f863e092ab46ed18212e207157 (diff) |
st/mesa: consolidate listing of depth formats
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_format.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 4360ed7d652..c22a1d5984f 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -595,6 +595,14 @@ struct format_mapping PIPE_FORMAT_A8B8G8R8_SRGB, \ 0 +#define DEFAULT_DEPTH_FORMATS \ + PIPE_FORMAT_Z24X8_UNORM, \ + PIPE_FORMAT_X8Z24_UNORM, \ + PIPE_FORMAT_Z16_UNORM, \ + PIPE_FORMAT_Z24_UNORM_S8_USCALED, \ + PIPE_FORMAT_S8_USCALED_Z24_UNORM, \ + 0 + /** * This table maps OpenGL texture format enums to Gallium pipe_format enums. * Multiple GL enums might map to multiple pipe_formats. @@ -736,27 +744,20 @@ static struct format_mapping format_map[] = { /* Depth formats */ { { GL_DEPTH_COMPONENT16, 0 }, - { PIPE_FORMAT_Z16_UNORM, PIPE_FORMAT_Z24_UNORM_S8_USCALED, - PIPE_FORMAT_S8_USCALED_Z24_UNORM, PIPE_FORMAT_Z32_UNORM, 0 } + { PIPE_FORMAT_Z16_UNORM, DEFAULT_DEPTH_FORMATS } }, { { GL_DEPTH_COMPONENT24, 0 }, { PIPE_FORMAT_Z24X8_UNORM, PIPE_FORMAT_X8Z24_UNORM, - PIPE_FORMAT_Z24_UNORM_S8_USCALED, PIPE_FORMAT_S8_USCALED_Z24_UNORM, - PIPE_FORMAT_Z32_UNORM, 0 } + DEFAULT_DEPTH_FORMATS } }, { { GL_DEPTH_COMPONENT32, 0 }, - { PIPE_FORMAT_Z32_UNORM, - PIPE_FORMAT_Z24X8_UNORM, PIPE_FORMAT_X8Z24_UNORM, - PIPE_FORMAT_Z16_UNORM, - PIPE_FORMAT_Z24_UNORM_S8_USCALED, PIPE_FORMAT_S8_USCALED_Z24_UNORM, 0 } + { PIPE_FORMAT_Z32_UNORM, DEFAULT_DEPTH_FORMATS } }, { { GL_DEPTH_COMPONENT, 0 }, - { PIPE_FORMAT_Z24X8_UNORM, PIPE_FORMAT_X8Z24_UNORM, - PIPE_FORMAT_Z32_UNORM, PIPE_FORMAT_Z16_UNORM, - PIPE_FORMAT_Z24_UNORM_S8_USCALED, PIPE_FORMAT_S8_USCALED_Z24_UNORM, 0 } + { DEFAULT_DEPTH_FORMATS } }, /* stencil formats */ |