[Piglit] [PATCH 04/16] all.tests: make fbo format tests concurrent
Marek Olšák
maraeo at gmail.com
Sun Nov 24 15:52:23 PST 2013
From: Marek Olšák <marek.olsak at amd.com>
---
tests/all.tests | 31 +++++++++++++++----------------
tests/fbo/fbo-alphatest-formats.c | 3 ++-
tests/fbo/fbo-blending-formats.c | 3 ++-
tests/fbo/fbo-clear-formats.c | 10 ++++++++--
tests/fbo/fbo-colormask-formats.c | 3 ++-
tests/fbo/fbo-formats.h | 2 +-
6 files changed, 30 insertions(+), 22 deletions(-)
diff --git a/tests/all.tests b/tests/all.tests
index dd2bb03..6959ea7 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -173,13 +173,13 @@ def add_vp1(name):
execfile(testsDir + '/glean-vertProg1.tests')
def add_fbo_formats_tests(path, extension, suffix=''):
- profile.tests[path + '/fbo-generatemipmap-formats' + suffix] = PlainExecTest('fbo-generatemipmap-formats -auto ' + extension)
- profile.tests[path + '/fbo-clear-formats' + suffix] = PlainExecTest('fbo-clear-formats -auto ' + extension)
+ profile.tests[path + '/fbo-generatemipmap-formats' + suffix] = concurrent_test('fbo-generatemipmap-formats ' + extension)
+ profile.tests[path + '/fbo-clear-formats' + suffix] = concurrent_test('fbo-clear-formats ' + extension)
profile.tests[path + '/get-renderbuffer-internalformat' + suffix] = concurrent_test('get-renderbuffer-internalformat ' + extension)
if 'depth' not in extension:
- profile.tests[path + '/fbo-blending-formats' + suffix] = PlainExecTest('fbo-blending-formats -auto ' + extension)
- profile.tests[path + '/fbo-alphatest-formats' + suffix] = PlainExecTest('fbo-alphatest-formats -auto ' + extension)
- profile.tests[path + '/fbo-colormask-formats' + suffix] = PlainExecTest('fbo-colormask-formats -auto ' + extension)
+ profile.tests[path + '/fbo-blending-formats' + suffix] = concurrent_test('fbo-blending-formats ' + extension)
+ profile.tests[path + '/fbo-alphatest-formats' + suffix] = concurrent_test('fbo-alphatest-formats ' + extension)
+ profile.tests[path + '/fbo-colormask-formats' + suffix] = concurrent_test('fbo-colormask-formats ' + extension)
def add_msaa_formats_tests(group, extension):
for num_samples in MSAA_SAMPLE_COUNTS:
@@ -190,17 +190,16 @@ def add_msaa_formats_tests(group, extension):
+ args)
def add_fbo_generatemipmap_extension(group, extension, name):
- group[name] = PlainExecTest(['fbo-generatemipmap-formats', '-auto',
- extension])
+ group[name] = concurrent_test('fbo-generatemipmap-formats ' + extension)
def add_fbo_clear_extension(group, extension, name):
- group[name] = PlainExecTest(['fbo-clear-formats', '-auto', extension])
+ group[name] = concurrent_test('fbo-clear-formats ' + extension)
def add_fbo_blending_extension(group, extension, name):
- group[name] = PlainExecTest(['fbo-blending-formats', '-auto', extension])
+ group[name] = concurrent_test('fbo-blending-formats ' + extension)
def add_fbo_alphatest_extension(group, extension, name):
- group[name] = PlainExecTest(['fbo-alphatest-formats', '-auto', extension])
+ group[name] = concurrent_test('fbo-alphatest-formats ' + extension)
def add_fbo_rg(group, format):
@@ -1668,7 +1667,7 @@ add_depthstencil_render_miplevels_tests(
('d=z32f_s8', 'd=z32f', 'd=z32f_s8_s=z24_s8', 'd=z32f_s=z24_s8',
's=z24_s8_d=z32f_s8', 's=z24_s8_d=z32f', 'd=s=z32f_s8', 's=d=z32f_s8',
'ds=z32f_s8'))
-arb_depth_buffer_float['fbo-clear-formats stencil'] = PlainExecTest(['fbo-clear-formats', 'GL_ARB_depth_buffer_float', 'stencil', '-auto'])
+arb_depth_buffer_float['fbo-clear-formats stencil'] = concurrent_test('fbo-clear-formats GL_ARB_depth_buffer_float stencil')
arb_texture_env_crossbar = Group()
spec['ARB_texture_env_crossbar'] = arb_texture_env_crossbar
@@ -2054,13 +2053,13 @@ add_concurrent_test(ext_framebuffer_object, 'fbo-generatemipmap-noimage')
add_plain_test(ext_framebuffer_object, 'fdo20701')
add_plain_test(ext_framebuffer_object, 'fbo-1d')
add_plain_test(ext_framebuffer_object, 'fbo-3d')
-add_plain_test(ext_framebuffer_object, 'fbo-alphatest-formats')
+add_concurrent_test(ext_framebuffer_object, 'fbo-alphatest-formats')
add_plain_test(ext_framebuffer_object, 'fbo-alphatest-nocolor')
add_plain_test(ext_framebuffer_object, 'fbo-alphatest-nocolor-ff')
-add_plain_test(ext_framebuffer_object, 'fbo-blending-formats')
+add_concurrent_test(ext_framebuffer_object, 'fbo-blending-formats')
add_plain_test(ext_framebuffer_object, 'fbo-bind-renderbuffer')
add_plain_test(ext_framebuffer_object, 'fbo-clearmipmap')
-add_plain_test(ext_framebuffer_object, 'fbo-clear-formats')
+add_concurrent_test(ext_framebuffer_object, 'fbo-clear-formats')
add_plain_test(ext_framebuffer_object, 'fbo-copyteximage')
add_plain_test(ext_framebuffer_object, 'fbo-copyteximage-simple')
add_plain_test(ext_framebuffer_object, 'fbo-cubemap')
@@ -2079,7 +2078,7 @@ add_plain_test(ext_framebuffer_object, 'fbo-fragcoord')
add_plain_test(ext_framebuffer_object, 'fbo-fragcoord2')
add_plain_test(ext_framebuffer_object, 'fbo-generatemipmap')
add_plain_test(ext_framebuffer_object, 'fbo-generatemipmap-filtering')
-add_plain_test(ext_framebuffer_object, 'fbo-generatemipmap-formats')
+add_concurrent_test(ext_framebuffer_object, 'fbo-generatemipmap-formats')
add_plain_test(ext_framebuffer_object, 'fbo-generatemipmap-scissor')
add_plain_test(ext_framebuffer_object, 'fbo-generatemipmap-nonsquare')
add_plain_test(ext_framebuffer_object, 'fbo-generatemipmap-npot')
@@ -2120,7 +2119,7 @@ add_depthstencil_render_miplevels_tests(
('s=z24_s8', 'd=z24_s8', 'd=z24_s8_s=z24_s8', 'd=z24_s=z24_s8',
's=z24_s8_d=z24_s8', 's=z24_s8_d=z24', 'd=s=z24_s8', 's=d=z24_s8',
'ds=z24_s8'))
-ext_packed_depth_stencil['fbo-clear-formats stencil'] = PlainExecTest(['fbo-clear-formats', 'GL_EXT_packed_depth_stencil', 'stencil', '-auto'])
+ext_packed_depth_stencil['fbo-clear-formats stencil'] = concurrent_test('fbo-clear-formats GL_EXT_packed_depth_stencil stencil')
ext_texture_array = Group()
spec['EXT_texture_array'] = ext_texture_array
diff --git a/tests/fbo/fbo-alphatest-formats.c b/tests/fbo/fbo-alphatest-formats.c
index 59881c2..04f0db8 100644
--- a/tests/fbo/fbo-alphatest-formats.c
+++ b/tests/fbo/fbo-alphatest-formats.c
@@ -235,7 +235,7 @@ static enum piglit_result test_format(const struct format_desc *format)
/*
* Now check alpha test using the window buffer.
*/
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glViewport(0, 0, piglit_width, piglit_height);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
@@ -250,6 +250,7 @@ static enum piglit_result test_format(const struct format_desc *format)
glDisable(GL_TEXTURE_2D);
glDeleteTextures(1, &tex);
+ glBindFramebufferEXT(GL_FRAMEBUFFER, piglit_winsys_fbo);
glDeleteFramebuffersEXT(1, &fb);
if (!pass) {
diff --git a/tests/fbo/fbo-blending-formats.c b/tests/fbo/fbo-blending-formats.c
index 50b2d0a..586d80a 100644
--- a/tests/fbo/fbo-blending-formats.c
+++ b/tests/fbo/fbo-blending-formats.c
@@ -331,7 +331,7 @@ static enum piglit_result test_format(const struct format_desc *format)
pass = GL_FALSE;
}
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glViewport(0, 0, piglit_width, piglit_height);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
@@ -346,6 +346,7 @@ static enum piglit_result test_format(const struct format_desc *format)
glDisable(GL_TEXTURE_2D);
glDeleteTextures(1, &tex);
+ glBindFramebufferEXT(GL_FRAMEBUFFER, piglit_winsys_fbo);
glDeleteFramebuffersEXT(1, &fb);
if (!pass) {
diff --git a/tests/fbo/fbo-clear-formats.c b/tests/fbo/fbo-clear-formats.c
index 884f147..899997a 100644
--- a/tests/fbo/fbo-clear-formats.c
+++ b/tests/fbo/fbo-clear-formats.c
@@ -74,6 +74,7 @@ do_rgba_clear(GLenum format, GLuint tex, int level, int size)
status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glDeleteFramebuffersEXT(1, &fb);
return false;
}
@@ -121,6 +122,7 @@ do_rgba_clear(GLenum format, GLuint tex, int level, int size)
glDisable(GL_SCISSOR_TEST);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glDeleteFramebuffersEXT(1, &fb);
return true;
@@ -151,6 +153,7 @@ do_depth_clear(GLenum format, GLuint tex, int level, int size)
status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glDeleteFramebuffersEXT(1, &fb);
return false;
}
@@ -166,6 +169,7 @@ do_depth_clear(GLenum format, GLuint tex, int level, int size)
glDisable(GL_SCISSOR_TEST);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glDeleteFramebuffersEXT(1, &fb);
glDrawBuffer(draw_buffer);
@@ -199,6 +203,7 @@ do_stencil_clear(GLenum format, GLuint tex, int level, int size)
status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glDeleteFramebuffersEXT(1, &fb);
return false;
}
@@ -214,6 +219,7 @@ do_stencil_clear(GLenum format, GLuint tex, int level, int size)
glDisable(GL_SCISSOR_TEST);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glDeleteFramebuffersEXT(1, &fb);
glDrawBuffer(draw_buffer);
@@ -328,7 +334,7 @@ draw_stencil_mipmap(int x, int y, int dim, GLuint tex, GLuint level)
glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT,
GL_TEXTURE_2D, tex, level);
- glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, piglit_winsys_fbo);
glWindowPos2i(x, y);
glCopyPixels(0, 0, dim, dim, GL_STENCIL);
if (!piglit_check_gl_error(GL_NO_ERROR)) {
@@ -336,7 +342,7 @@ draw_stencil_mipmap(int x, int y, int dim, GLuint tex, GLuint level)
piglit_report_result(PIGLIT_FAIL);
}
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
glDeleteFramebuffers(1, &fbo);
glDrawBuffer(draw_buffer);
diff --git a/tests/fbo/fbo-colormask-formats.c b/tests/fbo/fbo-colormask-formats.c
index f6a951d..940ac3f 100644
--- a/tests/fbo/fbo-colormask-formats.c
+++ b/tests/fbo/fbo-colormask-formats.c
@@ -198,7 +198,7 @@ static enum piglit_result test_format(const struct format_desc *format)
/*
* Display the texture.
*/
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glViewport(0, 0, piglit_width, piglit_height);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
@@ -213,6 +213,7 @@ static enum piglit_result test_format(const struct format_desc *format)
glDisable(GL_TEXTURE_2D);
glDeleteTextures(1, &tex);
+ glBindFramebufferEXT(GL_FRAMEBUFFER, piglit_winsys_fbo);
glDeleteFramebuffersEXT(1, &fb);
piglit_present_results();
diff --git a/tests/fbo/fbo-formats.h b/tests/fbo/fbo-formats.h
index 03c96a2..4b64ad8 100644
--- a/tests/fbo/fbo-formats.h
+++ b/tests/fbo/fbo-formats.h
@@ -632,7 +632,7 @@ static enum piglit_result fbo_formats_display(test_func test_format)
bool all_skip = true;
unsigned i;
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glClearColor(0.5, 0.5, 0.5, 0.5);
glClear(GL_COLOR_BUFFER_BIT);
--
1.8.3.2
More information about the Piglit
mailing list