-#!/usr/bin/env python
#
# Copyright 2014 Intel Corporation
#
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':
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:
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():