diff options
author | Nanley Chery <[email protected]> | 2015-05-19 10:35:39 -0700 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2015-08-26 14:36:42 -0700 |
commit | 8ae37365f30594498184fe5428f961a9c310fd8c (patch) | |
tree | f6cb1eb1e21003099973db5cea81e073498d1bf8 /src/mesa/main/format_info.py | |
parent | c4cbaca327174135e28353c3438241b08bf96755 (diff) |
mesa/formats: define the 2D ASTC formats
Define the mesa formats and make changes necessary for compilation
without errors. Also add support for _mesa_get_srgb_format_linear().
v2. conform the ASTC MESA_FORMAT enums to the existing naming convention.
v3. remove ASTC cases for _mesa_get_uncompressed_format(). This function is
only used for generating mipmaps - something ASTC formats do not support
due to lack of online compression.
Reviewed-by: Anuj Phogat <[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 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/format_info.py b/src/mesa/main/format_info.py index 839d4073c61..22eb5a734a6 100644 --- a/src/mesa/main/format_info.py +++ b/src/mesa/main/format_info.py @@ -122,6 +122,9 @@ def get_channel_bits(fmat, chan_name): elif fmat.layout == 'bptc': bits = 16 if fmat.name.endswith('_FLOAT') else 8 return bits if fmat.has_channel(chan_name) else 0 + elif fmat.layout == 'astc': + bits = 16 if 'RGBA' in fmat.name else 8 + return bits if fmat.has_channel(chan_name) else 0 else: assert False else: |