[Piglit] [PATCH 08/24] gen_shader_bit_encoding_tests.py: remove unecissary assignments

Dylan Baker baker.dylan.c at gmail.com
Mon Nov 24 09:58:08 PST 2014


This removes the creation of convenience variables that aren't actually
that convenient. They're not much shorter than the dictionary values they
come from, and they're exclusively passed into a template.

v2: - add this patch

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 generated_tests/gen_shader_bit_encoding_tests.py | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/generated_tests/gen_shader_bit_encoding_tests.py b/generated_tests/gen_shader_bit_encoding_tests.py
index 8c48f70..614aeb8 100644
--- a/generated_tests/gen_shader_bit_encoding_tests.py
+++ b/generated_tests/gen_shader_bit_encoding_tests.py
@@ -142,11 +142,6 @@ def main():
             os.makedirs(dirname)
 
         for func, attrib in FUNCS.iteritems():
-            in_func = attrib['in_func']
-            out_func = attrib['out_func']
-            input_type = attrib['input']
-            output_type = attrib['output']
-
             for execution_stage in ('vs', 'fs'):
                 for in_modifier_func, modifier_func in MODIFIER_FUNCS.iteritems():
                     # Modifying the sign of an unsigned number doesn't make sense.
@@ -173,10 +168,10 @@ def main():
                             func=func,
                             modifier_func=modifier_func,
                             in_modifier_func=in_modifier_func,
-                            in_func=in_func,
-                            out_func=out_func,
-                            input_type=input_type,
-                            output_type=output_type,
+                            in_func=attrib['in_func'],
+                            out_func=attrib['out_func'],
+                            input_type=attrib['input_type'],
+                            output_type=attrib['output_type'],
                             test_data=TEST_DATA))
 
 
-- 
2.1.3



More information about the Piglit mailing list