@@ -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