[Piglit] [PATCH 2/2] arb_uniform_buffer_object: Remove unused field from test generatation script

Timothy Arceri t_arceri at yahoo.com.au
Sun Sep 20 04:44:11 PDT 2015


Cc: Ian Romanick <ian.d.romanick at intel.com>
---
 generated_tests/random_ubo.py | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/generated_tests/random_ubo.py b/generated_tests/random_ubo.py
index f6952d3..cae313a 100644
--- a/generated_tests/random_ubo.py
+++ b/generated_tests/random_ubo.py
@@ -791,7 +791,7 @@ def generate_test_vectors(fields,
     return test_vectors
 
 
-def scalar_derp(type, name, offset, data):
+def scalar_derp(type, name, data):
     """Return a GLSL code string to compare a scalar with its expected value."""
     if type == "bool":
         if int(data) == 0:
@@ -823,7 +823,7 @@ def scalar_derp(type, name, offset, data):
         raise Exception("Unknown scalar type {}".format(type))
 
 
-def vector_derp(type, name, offset, data):
+def vector_derp(type, name, data):
     """Return a list of GLSL code strings that compare each field of a vector
     its expected value.
     """
@@ -832,12 +832,11 @@ def vector_derp(type, name, offset, data):
 
     return [scalar_derp(scalar,
                  "{}.{}".format(name, "xyzw"[i]),
-                 offset,
                  data[i])
             for i in xrange(vector_size(type))]
 
 
-def matrix_derp(type, name, offset, data):
+def matrix_derp(type, name, data):
     """Return a list of GLSL code strings that compare each field of a matrix
     its expected value.
     """
@@ -854,7 +853,6 @@ def matrix_derp(type, name, offset, data):
         data_pairs.extend(vector_derp(
                 column_type,
                 "{}[{}]".format(name, i),
-                offset,
                 data[(i * r):(i * r) + r]))
 
     return data_pairs
@@ -940,17 +938,14 @@ def generate_array_data_pairs(name, api_name, element_type, row_major, offset, p
             if isscalar(base_type):
                 checkers.append(scalar_derp(base_type,
                                             name_with_index,
-                                            offset,
                                             data[0]))
             elif isvector(base_type):
                 checkers.extend(vector_derp(base_type,
                                             name_with_index,
-                                            offset,
                                             data))
             elif ismatrix(base_type):
                 checkers.extend(matrix_derp(base_type,
                                             name_with_index,
-                                            offset,
                                             data))
 
 def generate_data_pairs(uniform_blocks, packing):
@@ -995,17 +990,14 @@ def generate_data_pairs(uniform_blocks, packing):
                     if isscalar(m.GLSL_type):
                         checkers.append(scalar_derp(m.GLSL_type,
                                                     m.GLSL_name,
-                                                    m.offset,
                                                     data[0]))
                     elif isvector(m.GLSL_type):
                         checkers.extend(vector_derp(m.GLSL_type,
                                                     m.GLSL_name,
-                                                    m.offset,
                                                     data))
                     elif ismatrix(m.GLSL_type):
                         checkers.extend(matrix_derp(m.GLSL_type,
                                                     m.GLSL_name,
-                                                    m.offset,
                                                     data))
 
     return checkers, setters
-- 
2.4.3



More information about the Piglit mailing list