After all the previous cleanups, it's clear that the callers only ever
ask for SINT->SINT or UINT->UINT. Cuts 20k of compiled text from
gallium drivers.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2744>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2744>
channel = Channel(SIGNED, False, True, 32)
native_type = 'int'
suffix = 'signed'
channel = Channel(SIGNED, False, True, 32)
native_type = 'int'
suffix = 'signed'
- generate_format_unpack(format, channel, native_type, suffix)
generate_format_pack(format, channel, native_type, suffix)
elif format.is_pure_signed():
native_type = 'int'
generate_format_pack(format, channel, native_type, suffix)
elif format.is_pure_signed():
native_type = 'int'
native_type = 'unsigned'
suffix = 'unsigned'
channel = Channel(UNSIGNED, False, True, 32)
native_type = 'unsigned'
suffix = 'unsigned'
channel = Channel(UNSIGNED, False, True, 32)
- generate_format_unpack(format, channel, native_type, suffix)
generate_format_pack(format, channel, native_type, suffix)
else:
channel = Channel(FLOAT, False, False, 32)
generate_format_pack(format, channel, native_type, suffix)
else:
channel = Channel(FLOAT, False, False, 32)
if format.is_pure_unsigned():
print(" &util_format_%s_unpack_unsigned, /* unpack_rgba_uint */" % format.short_name())
print(" &util_format_%s_pack_unsigned, /* pack_rgba_uint */" % format.short_name())
if format.is_pure_unsigned():
print(" &util_format_%s_unpack_unsigned, /* unpack_rgba_uint */" % format.short_name())
print(" &util_format_%s_pack_unsigned, /* pack_rgba_uint */" % format.short_name())
- print(" &util_format_%s_unpack_signed, /* unpack_rgba_sint */" % format.short_name())
+ print(" NULL, /* unpack_rgba_sint */")
print(" &util_format_%s_pack_signed, /* pack_rgba_sint */" % format.short_name())
print(" &util_format_%s_fetch_unsigned, /* fetch_rgba_uint */" % format.short_name())
print(" NULL /* fetch_rgba_sint */")
elif format.is_pure_signed():
print(" &util_format_%s_pack_signed, /* pack_rgba_sint */" % format.short_name())
print(" &util_format_%s_fetch_unsigned, /* fetch_rgba_uint */" % format.short_name())
print(" NULL /* fetch_rgba_sint */")
elif format.is_pure_signed():
- print(" &util_format_%s_unpack_unsigned, /* unpack_rgba_uint */" % format.short_name())
+ print(" NULL, /* unpack_rgba_uint */")
print(" &util_format_%s_pack_unsigned, /* pack_rgba_uint */" % format.short_name())
print(" &util_format_%s_unpack_signed, /* unpack_rgba_sint */" % format.short_name())
print(" &util_format_%s_pack_signed, /* pack_rgba_sint */" % format.short_name())
print(" &util_format_%s_pack_unsigned, /* pack_rgba_uint */" % format.short_name())
print(" &util_format_%s_unpack_signed, /* unpack_rgba_sint */" % format.short_name())
print(" &util_format_%s_pack_signed, /* pack_rgba_sint */" % format.short_name())