summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_format_pack.py
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-04-07 19:47:24 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-04-07 19:47:24 +0100
commit7f9444050fbf91a5727617ba39806f28ea0921a2 (patch)
tree6c4385b7e512c25d3618ac50aefb5622c7900b17 /src/gallium/auxiliary/util/u_format_pack.py
parent78fd65fd2c9b537b88bf35454b98323029ee1bb3 (diff)
util: Implement YUV and subsampled RGB format conversion.
Diffstat (limited to 'src/gallium/auxiliary/util/u_format_pack.py')
-rw-r--r--src/gallium/auxiliary/util/u_format_pack.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_format_pack.py b/src/gallium/auxiliary/util/u_format_pack.py
index 3d89c68eaa..aaeb4ce34c 100644
--- a/src/gallium/auxiliary/util/u_format_pack.py
+++ b/src/gallium/auxiliary/util/u_format_pack.py
@@ -611,12 +611,16 @@ def generate_format_fetch(format, dst_channel, dst_native_type, dst_suffix):
print
+def is_format_hand_written(format):
+ return format.layout in ('s3tc', 'subsampled')
+
def generate(formats):
print
print '#include "pipe/p_compiler.h"'
print '#include "u_math.h"'
print '#include "u_format.h"'
print '#include "u_format_srgb.h"'
+ print '#include "u_format_yuv.h"'
print '#include "u_half.h"'
print
@@ -629,7 +633,7 @@ def generate(formats):
suffix = 'float'
for format in formats:
- if format.layout != 's3tc':
+ if not is_format_hand_written(format):
generate_format_unpack(format, channel, native_type, suffix)
generate_format_pack(format, channel, native_type, suffix)
generate_format_fetch(format, channel, native_type, suffix)
@@ -639,7 +643,7 @@ def generate(formats):
suffix = '8unorm'
for format in formats:
- if format.layout != 's3tc':
+ if not is_format_hand_written(format):
generate_format_unpack(format, channel, native_type, suffix)
generate_format_pack(format, channel, native_type, suffix)