diff options
author | Nanley Chery <[email protected]> | 2015-08-07 14:36:23 -0700 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2015-08-19 16:39:41 -0700 |
commit | 0872b042b13388bc870a3acf167a6ce692b734dd (patch) | |
tree | fac69c5f0b2c77aa8f66f49b4f3d31f00cd97396 /src/mesa/main/format_info.py | |
parent | 2438e2fe326d7cb9f9d003f6edf77821e41ef22c (diff) |
mesa/formats: add more MESA_FORMAT_LAYOUTs
Add the classes of compressed formats as layouts. This allows the detection
of compressed formats belonging to a certain category of compressed formats.
v2. simplify layout name construction (Ilia).
Reviewed-by: Chad Versace <[email protected]>
Signed-off-by: Nanley Chery <[email protected]>
Diffstat (limited to 'src/mesa/main/format_info.py')
-rw-r--r-- | src/mesa/main/format_info.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/mesa/main/format_info.py b/src/mesa/main/format_info.py index 3bae57e54ed..c249e73a551 100644 --- a/src/mesa/main/format_info.py +++ b/src/mesa/main/format_info.py @@ -98,14 +98,6 @@ def get_gl_data_type(fmat): else: assert False -def get_mesa_layout(fmat): - if fmat.layout == 'array': - return 'MESA_FORMAT_LAYOUT_ARRAY' - elif fmat.layout == 'packed': - return 'MESA_FORMAT_LAYOUT_PACKED' - else: - return 'MESA_FORMAT_LAYOUT_OTHER' - def get_channel_bits(fmat, chan_name): if fmat.is_compressed(): # These values are pretty-much bogus, but OpenGL requires that we @@ -179,7 +171,7 @@ for fmat in formats: print ' {' print ' {0},'.format(fmat.name) print ' "{0}",'.format(fmat.name) - print ' {0},'.format(get_mesa_layout(fmat)) + print ' {0},'.format('MESA_FORMAT_LAYOUT_' + fmat.layout.upper()) print ' {0},'.format(get_gl_base_format(fmat)) print ' {0},'.format(get_gl_data_type(fmat)) |