diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-04-09 14:03:02 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-04-09 16:32:47 +0100 |
commit | d3808b1b1f34dbb826b99102786d94e1baf9d667 (patch) | |
tree | c03be26b133dd89b1ce611c663460a97cb0e4147 /src/gallium/auxiliary/util/u_format_table.py | |
parent | efae8f33f2c34666c614d5b00cab618425de6f66 (diff) |
util: Add dedicated depth-stencil packing/unpacking functions.
Depth-stencil manually written given that each one is very close to
be a special case.
u_format_zs.c's still untested.
Diffstat (limited to 'src/gallium/auxiliary/util/u_format_table.py')
-rwxr-xr-x | src/gallium/auxiliary/util/u_format_table.py | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/util/u_format_table.py b/src/gallium/auxiliary/util/u_format_table.py index 94a4331b15..5440a8b7b8 100755 --- a/src/gallium/auxiliary/util/u_format_table.py +++ b/src/gallium/auxiliary/util/u_format_table.py @@ -129,11 +129,34 @@ def write_format_table(formats): print " %s%s\t/* %s */" % (swizzle_map[swizzle], sep, comment) print " }," print " %s," % (colorspace_map(format.colorspace),) - print " &util_format_%s_unpack_8unorm," % format.short_name() - print " &util_format_%s_pack_8unorm," % format.short_name() - print " &util_format_%s_unpack_float," % format.short_name() - print " &util_format_%s_pack_float," % format.short_name() - print " &util_format_%s_fetch_float" % format.short_name() + if format.colorspace != ZS: + print " &util_format_%s_unpack_rgba_8unorm," % format.short_name() + print " &util_format_%s_pack_rgba_8unorm," % format.short_name() + print " &util_format_%s_unpack_rgba_float," % format.short_name() + print " &util_format_%s_pack_rgba_float," % format.short_name() + print " &util_format_%s_fetch_rgba_float," % format.short_name() + else: + print " NULL, /* unpack_rgba_8unorm */" + print " NULL, /* pack_rgba_8unorm */" + print " NULL, /* unpack_rgba_float */" + print " NULL, /* pack_rgba_float */" + print " NULL, /* fetch_rgba_float */" + if format.colorspace == ZS and format.swizzles[0] != SWIZZLE_NONE: + print " &util_format_%s_unpack_z_32unorm," % format.short_name() + print " &util_format_%s_pack_z_32unorm," % format.short_name() + print " &util_format_%s_unpack_z_float," % format.short_name() + print " &util_format_%s_pack_z_float," % format.short_name() + else: + print " NULL, /* unpack_z_32unorm */" + print " NULL, /* pack_z_32unorm */" + print " NULL, /* unpack_z_float */" + print " NULL, /* pack_z_float */" + if format.colorspace == ZS and format.swizzles[1] != SWIZZLE_NONE: + print " &util_format_%s_unpack_s_8uscaled," % format.short_name() + print " &util_format_%s_pack_s_8uscaled" % format.short_name() + else: + print " NULL, /* unpack_s_8uscaled */" + print " NULL /* pack_s_8uscaled */" print "};" print |