[Piglit] [RESEND RFC 24/25] gen_tess_input_tests.py: homogenize {Tes, Tcs}Test

baker.dylan.c at gmail.com baker.dylan.c at gmail.com
Wed Oct 21 10:20:33 PDT 2015


From: Dylan Baker <baker.dylan.c at gmail.com>

This is going to allow for code sharing in the next patch.

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

diff --git a/generated_tests/gen_tess_input_tests.py b/generated_tests/gen_tess_input_tests.py
index 4950976..f96c725 100644
--- a/generated_tests/gen_tess_input_tests.py
+++ b/generated_tests/gen_tess_input_tests.py
@@ -95,6 +95,8 @@ class TcsTest(object):
         else:
             self.var_type_full = self.var_type
 
+        self.reference_size = 12
+
     @property
     def built_in(self):
         return self.var_name.startswith('gl_')
@@ -134,9 +136,9 @@ class TcsTest(object):
         np.random.seed(17)
 
         if self.var_array:
-            n = self.var_array * 12
+            n = self.var_array * self.reference_size
         else:
-            n = 12
+            n = self.reference_size
 
         if self.var_type.startswith('i'):
             rand = lambda: np.random.randint(-0x80000000, 0x7fffffff)
-- 
2.6.1



More information about the Piglit mailing list