On Sun, Oct 27, 2013 at 7:50 AM, Paul Berry <[email protected]> wrote: > Since MSAA-to-MSAA blits require the source and destination rectangles > to be exactly the same size, GL_LINEAR and GL_NEAREST filtering should > be equivalent. So just add an option to the "multisample-blit" test > that causes it to do a GL_LINEAR blit. > --- > tests/all.tests | 11 ++++++++--- > .../spec/ext_framebuffer_multisample/multisample-blit.cpp | 15 > +++++++++++++-- > 2 files changed, 21 insertions(+), 5 deletions(-) > > diff --git a/tests/all.tests b/tests/all.tests > index 284440a..2dd3d6f 100644 > --- a/tests/all.tests > +++ b/tests/all.tests > @@ -1730,10 +1730,15 @@ for num_samples in MSAA_SAMPLE_COUNTS: > > for num_samples in MSAA_SAMPLE_COUNTS: > for buffer_type in ('color', 'depth', 'stencil'): > - test_name = ' ' .join(['multisample-blit', str(num_samples), > buffer_type]) > - executable = 'ext_framebuffer_multisample-{0} -auto'.format( > + sensible_options = [] > + if buffer_type == 'color': > + sensible_options.append('linear') > + for options in power_set(sensible_options): > + test_name = ' ' .join(['multisample-blit', str(num_samples), > + buffer_type] + options) > + executable = 'ext_framebuffer_multisample-{0} -auto'.format( > test_name) > - ext_framebuffer_multisample[test_name] = PlainExecTest(executable) > + ext_framebuffer_multisample[test_name] = > PlainExecTest(executable) > > for num_samples in MSAA_SAMPLE_COUNTS: > for buffer_type in ('color', 'depth', 'stencil'): > diff --git a/tests/spec/ext_framebuffer_multisample/multisample-blit.cpp > b/tests/spec/ext_framebuffer_multisample/multisample-blit.cpp > index 9bfe4ab..e601fee 100644 > --- a/tests/spec/ext_framebuffer_multisample/multisample-blit.cpp > +++ b/tests/spec/ext_framebuffer_multisample/multisample-blit.cpp > @@ -56,6 +56,7 @@ Fbo dst_fbo; > TestPattern *test_pattern = NULL; > ManifestProgram *manifest_program = NULL; > GLbitfield buffer_to_test; > +GLenum filter_mode = GL_NEAREST; > > void > print_usage_and_exit(char *prog_name) > @@ -64,7 +65,9 @@ print_usage_and_exit(char *prog_name) > " where <buffer_type> is one of:\n" > " color\n" > " stencil\n" > - " depth\n", > + " depth\n" > + "Available options:\n" > + " linear: use GL_LINEAR filter mode\n", > prog_name); > piglit_report_result(PIGLIT_FAIL); > } > @@ -106,6 +109,14 @@ piglit_init(int argc, char **argv) > } else { > print_usage_and_exit(argv[0]); > } > + > + for (int i = 3; i < argc; i++) { > + if (strcmp(argv[i], "linear") == 0) > + filter_mode = GL_LINEAR; > + else > + print_usage_and_exit(argv[0]); > + } > + > test_pattern->compile(); > if (manifest_program) > manifest_program->compile(); > @@ -129,7 +140,7 @@ piglit_display() > glBindFramebuffer(GL_DRAW_FRAMEBUFFER, dst_fbo.handle); > glBlitFramebuffer(0, 0, pattern_width, pattern_height, > 0, 0, pattern_width, pattern_height, > - buffer_to_test, GL_NEAREST); > + buffer_to_test, filter_mode); > > /* If necessary, manifest the depth/stencil image in dst_fbo > * into a color image. This ensures that the blit that > -- > 1.8.4.1 >
Thanks for adding these tests Paul. This series is: Reviewed-by: Anuj Phogat <[email protected]> _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
