X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fformat_info.py;h=780dc0bec7d702b47d1d11df6db746c4950cded1;hb=192de3f051c70ff1404369f88ae2d55f1ffcf806;hp=839d4073c61f31b12a6f12491eca14de39f1279e;hpb=9b387b5d3f4103c51079ea5298d33086af6da433;p=mesa.git diff --git a/src/mesa/main/format_info.py b/src/mesa/main/format_info.py index 839d4073c61..780dc0bec7d 100644 --- a/src/mesa/main/format_info.py +++ b/src/mesa/main/format_info.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Copyright 2014 Intel Corporation # @@ -111,7 +110,7 @@ def get_channel_bits(fmat, chan_name): return 1 if fmat.has_channel('a') else 0 else: return 0 - elif fmat.layout == 'rgtc': + elif fmat.layout in ('rgtc', 'latc'): return 8 if fmat.has_channel(chan_name) else 0 elif fmat.layout in ('etc1', 'etc2'): if fmat.name.endswith('_ALPHA1') and chan_name == 'a': @@ -122,6 +121,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: @@ -182,8 +184,9 @@ for fmat in formats: print ' {0:d},'.format(fmat.colorspace == 'srgb') - print ' {0}, {1}, {2},'.format(fmat.block_width, fmat.block_height, - int(fmat.block_size() / 8)) + print ' {0}, {1}, {2}, {3},'.format(fmat.block_width, fmat.block_height, + fmat.block_depth, + int(fmat.block_size() / 8)) print ' {{ {0} }},'.format(', '.join(map(str, fmat.swizzle))) if fmat.is_array():