Like we just did for pack functions for freedreno, it will be useful to be
able to pick out a specific rgba unpack function instead of going through
the table.
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6307>
else:
dst_proto_type = 'void'
else:
dst_proto_type = 'void'
- print('static inline void')
- print('util_format_%s_unpack_%s(%s *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)' % (name, dst_suffix, dst_proto_type))
+ proto = 'util_format_%s_unpack_%s(%s *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)' % (name, dst_suffix, dst_proto_type)
+ print('void %s;' % proto, file=sys.stdout2)
+
+ print('void')
+ print(proto)
print('{')
if is_format_supported(format):
print('{')
if is_format_supported(format):
name = format.short_name()
name = format.short_name()
- print('static inline void')
- print('util_format_%s_fetch_rgba(void *in_dst, const uint8_t *src, UNUSED unsigned i, UNUSED unsigned j)' % (name))
+ proto = 'util_format_%s_fetch_rgba(void *in_dst, const uint8_t *src, UNUSED unsigned i, UNUSED unsigned j)' % (name)
+
+ print('void %s;' % proto, file=sys.stdout2)
+
+ print('void')
+ print(proto)
+
print('{')
print(' %s *dst = in_dst;' % dst_native_type)
print('{')
print(' %s *dst = in_dst;' % dst_native_type)