[Piglit] [PATCH 22/24] gen_builtin_packing_tests templates: Use xrange instead of range

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


Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 .../templates/gen_builtin_packing_tests/fs_pack.shader_test.mako    | 6 +++---
 .../templates/gen_builtin_packing_tests/fs_unpack.shader_test.mako  | 6 +++---
 .../templates/gen_builtin_packing_tests/vs_pack.shader_test.mako    | 6 +++---
 .../templates/gen_builtin_packing_tests/vs_unpack.shader_test.mako  | 6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/generated_tests/templates/gen_builtin_packing_tests/fs_pack.shader_test.mako b/generated_tests/templates/gen_builtin_packing_tests/fs_pack.shader_test.mako
index d827824..c3f0a21 100644
--- a/generated_tests/templates/gen_builtin_packing_tests/fs_pack.shader_test.mako
+++ b/generated_tests/templates/gen_builtin_packing_tests/fs_pack.shader_test.mako
@@ -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
diff --git a/generated_tests/templates/gen_builtin_packing_tests/fs_unpack.shader_test.mako b/generated_tests/templates/gen_builtin_packing_tests/fs_unpack.shader_test.mako
index 3269a6f..02b91f0 100644
--- a/generated_tests/templates/gen_builtin_packing_tests/fs_unpack.shader_test.mako
+++ b/generated_tests/templates/gen_builtin_packing_tests/fs_unpack.shader_test.mako
@@ -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
diff --git a/generated_tests/templates/gen_builtin_packing_tests/vs_pack.shader_test.mako b/generated_tests/templates/gen_builtin_packing_tests/vs_pack.shader_test.mako
index 65b9dab..5257dcc 100644
--- a/generated_tests/templates/gen_builtin_packing_tests/vs_pack.shader_test.mako
+++ b/generated_tests/templates/gen_builtin_packing_tests/vs_pack.shader_test.mako
@@ -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
diff --git a/generated_tests/templates/gen_builtin_packing_tests/vs_unpack.shader_test.mako b/generated_tests/templates/gen_builtin_packing_tests/vs_unpack.shader_test.mako
index a3776bc..6318582 100644
--- a/generated_tests/templates/gen_builtin_packing_tests/vs_unpack.shader_test.mako
+++ b/generated_tests/templates/gen_builtin_packing_tests/vs_unpack.shader_test.mako
@@ -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
-- 
2.1.3



More information about the Piglit mailing list