[Piglit] [PATCH] arb_texture_barrier: use itertools.product instead of nested loops

Ilia Mirkin imirkin at alum.mit.edu
Fri Jul 22 12:31:09 UTC 2016


What does this fix? IMO seems way harder to read. If you're really set on
using product, moving the array definitions out of line, with descriptive
names would solve that. E.g

RESOLUTIONS = [1,2,3]
for resolution, ... in itertools.product():

On Jul 22, 2016 2:09 AM, "Alejandro PiƱeiro" <apinheiro at igalia.com> wrote:

---
 tests/all.py | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/tests/all.py b/tests/all.py
index 2c78b0a..a29724e 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -4722,13 +4722,10 @@ with profile.group_manager(
 with profile.group_manager(
         PiglitGLTest,
         grouptools.join('spec', 'arb_texture_barrier')) as g:
-    for resolution in ['32', '512']:
-        for blend_passes in ['1', '42']:
-            for num_textures in ['1', '8']:
-                for granularity in ['8', '64', '128']:
-                    for draw_passes in ['1', '2', '3', '4', '7', '8']:
-                        g(['arb_texture_barrier-blending-in-shader',
resolution,
-                           blend_passes, num_textures, granularity,
draw_passes])
+    for resolution, blend_passes, num_textures, granularity, draw_passes
in itertools.product(
+            ['32', '512'], ['1', '42'], ['1', '8'], ['8', '64', '128'],
['1', '2', '3', '4', '7', '8']):
+        g(['arb_texture_barrier-blending-in-shader', resolution,
+           blend_passes, num_textures, granularity, draw_passes])


 # Group ARB_invalidate_subdata
--
2.7.4

_______________________________________________
Piglit mailing list
Piglit at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20160722/9adf1132/attachment.html>


More information about the Piglit mailing list