Signed-off-by: Topi Pohjolainen <topi.pohjolai...@intel.com> --- tests/all.py | 13 ++++++----- .../blit-mismatched-formats.cpp | 27 +++++++++++++++------- .../blit-mismatched-samples.cpp | 16 +++++++++++-- .../blit-mismatched-sizes.cpp | 17 ++++++++++++-- 4 files changed, 55 insertions(+), 18 deletions(-)
diff --git a/tests/all.py b/tests/all.py index 1411a87b5..7e45a81c3 100644 --- a/tests/all.py +++ b/tests/all.py @@ -2943,12 +2943,6 @@ with profile.test_list.group_manager( with profile.test_list.group_manager( PiglitGLTest, grouptools.join('spec', 'ext_framebuffer_multisample')) as g: - g(['ext_framebuffer_multisample-blit-mismatched-samples'], - 'blit-mismatched-samples') - g(['ext_framebuffer_multisample-blit-mismatched-sizes'], - 'blit-mismatched-sizes') - g(['ext_framebuffer_multisample-blit-mismatched-formats'], - 'blit-mismatched-formats') g(['ext_framebuffer_multisample-dlist'], 'dlist') g(['ext_framebuffer_multisample-enable-flag'], 'enable-flag') g(['ext_framebuffer_multisample-minmax'], 'minmax') @@ -2972,6 +2966,13 @@ with profile.test_list.group_manager( 'alpha-blending slow_cc') g(['ext_framebuffer_multisample-fast-clear'], 'fast-clear') + for test in ('blit-mismatched-formats', 'blit-mismatched-samples', + 'blit-mismatched-sizes'): + for fmt in ('GL_RGBA', 'GL_RGBA16F', 'GL_RGBA32F'): + g(['ext_framebuffer_multisample-{}'.format(test), + fmt], + '{} {}'.format(test, fmt)) + for sample_count in MSAA_SAMPLE_COUNTS: g(['ext_framebuffer_multisample-alpha-blending-after-rendering', sample_count], diff --git a/tests/spec/ext_framebuffer_multisample/blit-mismatched-formats.cpp b/tests/spec/ext_framebuffer_multisample/blit-mismatched-formats.cpp index 3cfa5165d..30ed8f302 100644 --- a/tests/spec/ext_framebuffer_multisample/blit-mismatched-formats.cpp +++ b/tests/spec/ext_framebuffer_multisample/blit-mismatched-formats.cpp @@ -113,15 +113,14 @@ piglit_display() GLfloat *expected_image; GLuint i; - FboConfig config_ms(GL_RGBA, 1, pattern_width, pattern_height); - - for(i = 0; i < ARRAY_SIZE(color_formats); i++) { + for (i = 0; i < ARRAY_SIZE(color_formats); i++) { expected_image = generate_expected_image(reference_image, pattern_width, pattern_height, color_formats[i].components); - config_ms.color_internalformat = color_formats[i].name; + FboConfig config_ms(color_formats[i].name, 1, + pattern_width, pattern_height); src_fbo.setup(config_ms); if (!piglit_check_gl_error(GL_NO_ERROR)) { @@ -198,12 +197,24 @@ piglit_display() free(expected_image); } - return (pass ? PIGLIT_PASS : PIGLIT_FAIL); + return pass ? PIGLIT_PASS : PIGLIT_FAIL; +} + +void +print_usage_and_exit(char *prog_name) +{ + printf("Usage: %s <format>\n", prog_name); + piglit_report_result(PIGLIT_FAIL); } void piglit_init(int argc, char **argv) { + if (argc < 2) + print_usage_and_exit(argv[0]); + + GLenum color_internal_format = piglit_get_gl_enum_from_name(argv[1]); + piglit_require_gl_version(21); piglit_require_extension("GL_ARB_framebuffer_object"); piglit_require_extension("GL_ARB_vertex_array_object"); @@ -211,18 +222,18 @@ piglit_init(int argc, char **argv) /* Passing sample count = 1 will create the FBOs with minimum supported * sample count. Both FBOs are created with GL_RGBA format by default. */ - src_fbo.setup(FboConfig(GL_RGBA, 1 /* sample count */, + src_fbo.setup(FboConfig(color_internal_format, 1 /* sample count */, pattern_width, pattern_height)); - dst_fbo.setup(FboConfig(GL_RGBA, 1 /* sample count */, + dst_fbo.setup(FboConfig(color_internal_format, 1 /* sample count */, pattern_width, pattern_height)); /* Single-sampled FBO used so that we can call glReadPixels to * examine the results. */ - ss_fbo.setup(FboConfig(GL_RGBA, 0 /* sample count */, + ss_fbo.setup(FboConfig(color_internal_format, 0 /* sample count */, pattern_width, pattern_height)); diff --git a/tests/spec/ext_framebuffer_multisample/blit-mismatched-samples.cpp b/tests/spec/ext_framebuffer_multisample/blit-mismatched-samples.cpp index 09e82d60f..867c19bd9 100644 --- a/tests/spec/ext_framebuffer_multisample/blit-mismatched-samples.cpp +++ b/tests/spec/ext_framebuffer_multisample/blit-mismatched-samples.cpp @@ -70,9 +70,21 @@ piglit_display() } void +print_usage_and_exit(char *prog_name) +{ + printf("Usage: %s <format>\n", prog_name); + piglit_report_result(PIGLIT_FAIL); +} + +void piglit_init(int argc, char **argv) { + if (argc < 2) + print_usage_and_exit(argv[0]); + GLint samples, max_samples; + const GLenum color_internal_format = + piglit_get_gl_enum_from_name(argv[1]); piglit_require_gl_version(21); piglit_require_extension("GL_ARB_framebuffer_object"); @@ -82,7 +94,7 @@ piglit_init(int argc, char **argv) * the next available sample count. So, this will create the FBO with * minimum supported sample count. */ - src_fbo.setup(FboConfig(GL_RGBA, 1 /* sample count */, + src_fbo.setup(FboConfig(color_internal_format, 1 /* sample count */, pattern_width, pattern_height)); @@ -101,7 +113,7 @@ piglit_init(int argc, char **argv) /* Creating FBO with (samples + 1) ensures that we get a different * value of sample count in dst_fbo. */ - dst_fbo.setup(FboConfig(GL_RGBA, samples + 1, + dst_fbo.setup(FboConfig(color_internal_format, samples + 1, pattern_width, pattern_height)); if (!piglit_check_gl_error(GL_NO_ERROR)) { diff --git a/tests/spec/ext_framebuffer_multisample/blit-mismatched-sizes.cpp b/tests/spec/ext_framebuffer_multisample/blit-mismatched-sizes.cpp index a60934393..12179e119 100644 --- a/tests/spec/ext_framebuffer_multisample/blit-mismatched-sizes.cpp +++ b/tests/spec/ext_framebuffer_multisample/blit-mismatched-sizes.cpp @@ -72,8 +72,21 @@ piglit_display() } void +print_usage_and_exit(char *prog_name) +{ + printf("Usage: %s <format>\n", prog_name); + piglit_report_result(PIGLIT_FAIL); +} + +void piglit_init(int argc, char **argv) { + if (argc < 2) + print_usage_and_exit(argv[0]); + + const GLenum color_internal_format = + piglit_get_gl_enum_from_name(argv[1]); + piglit_require_gl_version(21); piglit_require_extension("GL_ARB_framebuffer_object"); piglit_require_extension("GL_ARB_vertex_array_object"); @@ -81,11 +94,11 @@ piglit_init(int argc, char **argv) /* Passing sample count = 1 will create the FBOs with minimum supported * sample count. */ - src_fbo.setup(FboConfig(GL_RGBA, 1 /* sample count */, + src_fbo.setup(FboConfig(color_internal_format, 1 /* sample count */, pattern_width, pattern_height)); - dst_fbo.setup(FboConfig(GL_RGBA, 1 /* sample count */, + dst_fbo.setup(FboConfig(color_internal_format, 1 /* sample count */, pattern_width, pattern_height)); -- 2.11.0 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit