Mesa (master): util: Reorder the code generated function so that they are grouped by format.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Thu Apr 8 18:04:20 UTC 2010
Module: Mesa
Branch: master
Commit: 3f626646793bf6d8d20aa277ad1bc760a4c271f5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3f626646793bf6d8d20aa277ad1bc760a4c271f5
Author: José Fonseca <jfonseca at vmware.com>
Date: Thu Apr 8 16:24:43 2010 +0100
util: Reorder the code generated function so that they are grouped by format.
Makes it easier to copy and paste.
---
src/gallium/auxiliary/util/u_format_pack.py | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_format_pack.py b/src/gallium/auxiliary/util/u_format_pack.py
index 075f8ca..95d7691 100644
--- a/src/gallium/auxiliary/util/u_format_pack.py
+++ b/src/gallium/auxiliary/util/u_format_pack.py
@@ -657,22 +657,18 @@ def generate(formats):
if is_format_supported(format):
generate_format_type(format)
- channel = Channel(FLOAT, False, 32)
- native_type = 'float'
- suffix = 'float'
-
- for format in formats:
if not is_format_hand_written(format):
+ channel = Channel(FLOAT, False, 32)
+ native_type = 'float'
+ suffix = 'float'
+
generate_format_unpack(format, channel, native_type, suffix)
generate_format_pack(format, channel, native_type, suffix)
generate_format_fetch(format, channel, native_type, suffix)
- channel = Channel(UNSIGNED, True, 8)
- native_type = 'uint8_t'
- suffix = '8unorm'
+ channel = Channel(UNSIGNED, True, 8)
+ native_type = 'uint8_t'
+ suffix = '8unorm'
- for format in formats:
- if not is_format_hand_written(format):
generate_format_unpack(format, channel, native_type, suffix)
generate_format_pack(format, channel, native_type, suffix)
-
More information about the mesa-commit
mailing list