Commit 9d8e1715 authored by Dylan Baker's avatar Dylan Baker
Browse files

gen_builtin_packing_tests templates: Use xrange instead of range


Signed-off-by: default avatarDylan Baker <dylanx.c.baker@intel.com>
acked-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
parent 85f150c3
......@@ -22,7 +22,7 @@ const vec4 green = vec4(0, 1, 0, 1);
uniform ${func.vector_type} func_input;
% for i in range(func.num_valid_outputs):
% for i in xrange(func.num_valid_outputs):
uniform ${func.result_precision} uint expect${i};
% endfor
......@@ -33,7 +33,7 @@ void main()
${func.result_precision} uint actual = ${func.name}(func_input);
if (false
% for i in range(func.num_valid_outputs):
% for i in xrange(func.num_valid_outputs):
|| actual == expect${i}
% endfor
) {
......@@ -53,7 +53,7 @@ vertex/float/2
[test]
% for io in func.inout_seq:
uniform ${func.vector_type} func_input ${" ".join(io.input)}
% for i in range(func.num_valid_outputs):
% for i in xrange(func.num_valid_outputs):
uniform uint expect${i} ${io.valid_outputs[i]}
% endfor
draw arrays GL_TRIANGLE_FAN 0 4
......
......@@ -24,7 +24,7 @@ uniform highp uint func_input;
uniform bool exact;
% for i in range(func.num_valid_outputs):
% for i in xrange(func.num_valid_outputs):
uniform ${func.result_precision} ${func.vector_type} expect${i};
% endfor
......@@ -35,7 +35,7 @@ void main()
${func.result_precision} ${func.vector_type} actual = ${func.name}(func_input);
if (false
% for i in range(func.num_valid_outputs):
% for i in xrange(func.num_valid_outputs):
|| (exact ? actual == expect${i}
: distance(actual, expect${i}) < 0.00001)
% endfor
......@@ -62,7 +62,7 @@ uniform int exact 1
uniform int exact ${int(int(io.input[:-1]) in (0x0, 0xffffffff, 0x80808080,
0x81818181))}
% endif
% for i in range(func.num_valid_outputs):
% for i in xrange(func.num_valid_outputs):
uniform ${func.vector_type} expect${i} ${" ".join(io.valid_outputs[i])}
% endfor
draw arrays GL_TRIANGLE_FAN 0 4
......
......@@ -12,7 +12,7 @@ const vec4 green = vec4(0, 1, 0, 1);
uniform ${func.vector_type} func_input;
% for j in range(func.num_valid_outputs):
% for j in xrange(func.num_valid_outputs):
uniform ${func.result_precision} uint expect${j};
% endfor
......@@ -25,7 +25,7 @@ void main()
${func.result_precision} uint actual = ${func.name}(func_input);
if (false
% for j in range(func.num_valid_outputs):
% for j in xrange(func.num_valid_outputs):
|| actual == expect${j}
% endfor
) {
......@@ -58,7 +58,7 @@ vertex/float/2
[test]
% for io in func.inout_seq:
uniform ${func.vector_type} func_input ${" ".join(io.input)}
% for j in range(func.num_valid_outputs):
% for j in xrange(func.num_valid_outputs):
uniform uint expect${j} ${io.valid_outputs[j]}
% endfor
draw arrays GL_TRIANGLE_FAN 0 4
......
......@@ -14,7 +14,7 @@ uniform highp uint func_input;
uniform bool exact;
% for j in range(func.num_valid_outputs):
% for j in xrange(func.num_valid_outputs):
uniform ${func.result_precision} ${func.vector_type} expect${j};
% endfor
......@@ -28,7 +28,7 @@ void main()
${func.result_precision} ${func.vector_type} actual = ${func.name}(func_input);
if (false
% for i in range(func.num_valid_outputs):
% for i in xrange(func.num_valid_outputs):
|| (exact ? actual == expect${i} : distance(actual, expect${i}) < 0.00001)
% endfor
) {
......@@ -67,7 +67,7 @@ uniform int exact 1
uniform int exact ${int(int(io.input[:-1]) in (0x0, 0xffffffff, 0x80808080,
0x81818181))}
% endif
% for j in range(func.num_valid_outputs):
% for j in xrange(func.num_valid_outputs):
uniform ${func.vector_type} expect${j} ${" ".join(io.valid_outputs[j])}
% endfor
draw arrays GL_TRIANGLE_FAN 0 4
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment