[Piglit] [PATCH] arb_copy_image: Skip if sample count is not supported

Jason Ekstrand jason at jlekstrand.net
Fri Sep 19 15:08:30 PDT 2014


Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

On Fri, Sep 19, 2014 at 2:45 PM, Chris Forbes <chrisf at ijw.co.nz> wrote:

> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
>  tests/spec/arb_copy_image/formats.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/tests/spec/arb_copy_image/formats.c
> b/tests/spec/arb_copy_image/formats.c
> index a58580d..92715ba 100644
> --- a/tests/spec/arb_copy_image/formats.c
> +++ b/tests/spec/arb_copy_image/formats.c
> @@ -303,8 +303,16 @@ piglit_init(int argc, char **argv)
>         piglit_require_extension("GL_EXT_framebuffer_object");
>         piglit_require_extension("GL_EXT_texture_integer");
>         if (samples > 1) {
> +               int max_samples;
> +
>                 piglit_require_extension("GL_ARB_texture_multisample");
>                 piglit_require_extension("GL_ARB_sample_shading");
> +
> +               glGetIntegerv(GL_MAX_SAMPLES, &max_samples);
> +               if (samples > max_samples) {
> +                       printf("%d samples not supported\n", samples);
> +                       piglit_report_result(PIGLIT_SKIP);
> +               }
>         }
>
>         if (argc > 1) {
> --
> 1.8.5.3
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140919/7f3e25a8/attachment.html>


More information about the Piglit mailing list