[Piglit] [PATCH 6/7] texwrap: Convert to running concurrently into FBOs.
Eric Anholt
eric at anholt.net
Mon Aug 15 12:49:25 PDT 2011
Reduces runtime from 26s to 6.7s on my system.
---
tests/all.tests | 16 ++++++++++------
tests/texturing/texwrap.c | 11 ++++++-----
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/tests/all.tests b/tests/all.tests
index 1d59c4b..9e28c60 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -634,15 +634,19 @@ add_plain_test(texturing, 'texture-packed-formats')
add_plain_test(texturing, 'texture-rg')
add_plain_test(texturing, 'tex-srgb')
+def texwrap_test(args):
+ test = PlainExecTest(args + ['-fbo'])
+ test.runConcurrent = True
+ return test
def add_texwrap_test1(group, p1):
- group['texwrap-' + p1] = PlainExecTest(['texwrap', '-auto', p1])
- group['texwrap-' + p1 + '-bordercolor'] = PlainExecTest(['texwrap', '-auto', p1, 'bordercolor'])
+ group['texwrap-' + p1] = texwrap_test(['texwrap', '-auto', p1])
+ group['texwrap-' + p1 + '-bordercolor'] = texwrap_test(['texwrap', '-auto', p1, 'bordercolor'])
def add_texwrap_test2(group, p1, p2):
- group['texwrap-' + p1 + '-' + p2] = PlainExecTest(['texwrap', '-auto', p1, p2])
- group['texwrap-' + p1 + '-' + p2 + '-bordercolor'] = PlainExecTest(['texwrap', '-auto', p1, p2, 'bordercolor'])
+ group['texwrap-' + p1 + '-' + p2] = texwrap_test(['texwrap', '-auto', p1, p2])
+ group['texwrap-' + p1 + '-' + p2 + '-bordercolor'] = texwrap_test(['texwrap', '-auto', p1, p2, 'bordercolor'])
def add_texwrap_test3(group, p1, p2, p3):
- group['texwrap-' + p1 + '-' + p2 + '-' + p3] = PlainExecTest(['texwrap', '-auto', p1, p2, p3])
- group['texwrap-' + p1 + '-' + p2 + '-' + p3 + '-bordercolor'] = PlainExecTest(['texwrap', '-auto', p1, p2, p3, 'bordercolor'])
+ group['texwrap-' + p1 + '-' + p2 + '-' + p3] = texwrap_test(['texwrap', '-auto', p1, p2, p3])
+ group['texwrap-' + p1 + '-' + p2 + '-' + p3 + '-bordercolor'] = texwrap_test(['texwrap', '-auto', p1, p2, p3, 'bordercolor'])
def add_fbo_depth_tests(group, format):
group['fbo-depth-' + format + '-tex1d'] = PlainExecTest(['fbo-depth-tex1d', '-auto', format])
diff --git a/tests/texturing/texwrap.c b/tests/texturing/texwrap.c
index 99376ef..dae088a 100644
--- a/tests/texturing/texwrap.c
+++ b/tests/texturing/texwrap.c
@@ -831,7 +831,7 @@ static GLboolean test_simple()
GLboolean pass;
draw();
pass = probe_pixels();
- glutSwapBuffers();
+ piglit_present_results();
return pass;
}
@@ -910,9 +910,9 @@ static GLboolean check_support(float version, const char *extensions[2],
if (version <= glversion)
return GL_TRUE;
- if (((extensions[0] && glutExtensionSupported(extensions[0])) ||
- (extensions[1] && glutExtensionSupported(extensions[1]))) &&
- (!dep_extension || glutExtensionSupported(dep_extension)))
+ if (((extensions[0] && piglit_is_extension_supported(extensions[0])) ||
+ (extensions[1] && piglit_is_extension_supported(extensions[1]))) &&
+ (!dep_extension || piglit_is_extension_supported(dep_extension)))
return GL_TRUE;
return GL_FALSE;
@@ -1443,7 +1443,8 @@ void piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glutKeyboardFunc(key_func);
+ if (!piglit_automatic)
+ glutKeyboardFunc(key_func);
glClearColor(0.5, 0.5, 0.5, 1.0);
--
1.7.5.4
More information about the Piglit
mailing list