[Piglit] [PATCH 3/3] Transform feedback: Move piglit_require_transform_feedback().

Jordan Justen jljusten at gmail.com
Mon Jul 2 15:42:00 PDT 2012


Patch Series:
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

I assume you recommend I use piglit-util-gl.c for
* piglit_require_primitive_restart
* piglit_EnablePrimitiveRestart
* piglit_DisablePrimitiveRestart
(RE: [PATCH v2 1/2] util: add primitive restart util routines)

Thanks,

-Jordan

On Mon, Jul 2, 2012 at 2:57 PM, Paul Berry <stereotype441 at gmail.com> wrote:
> With the transform feedback wrapper functions removed,
> piglit_require_transform_feedback() was the only function left in
> piglit-transform-feedback.{c.h}.  This patch moves it to piglit-util.c
> so that it won't get lonely.
> ---
>  tests/util/CMakeLists.gl.txt           |    2 -
>  tests/util/piglit-transform-feedback.c |   43 --------------------------------
>  tests/util/piglit-transform-feedback.h |   32 -----------------------
>  tests/util/piglit-util-gl-common.h     |    2 +-
>  tests/util/piglit-util-gl.c            |   17 ++++++++++++
>  5 files changed, 18 insertions(+), 78 deletions(-)
>  delete mode 100644 tests/util/piglit-transform-feedback.c
>  delete mode 100644 tests/util/piglit-transform-feedback.h
>
> diff --git a/tests/util/CMakeLists.gl.txt b/tests/util/CMakeLists.gl.txt
> index 8b8d40e..02c6d3a 100644
> --- a/tests/util/CMakeLists.gl.txt
> +++ b/tests/util/CMakeLists.gl.txt
> @@ -4,7 +4,6 @@ set(UTIL_GL_SOURCES
>         piglit-dispatch-init.c
>         piglit-shader.c
>         piglit-shader-gl.c
> -       piglit-transform-feedback.c
>         piglit-util-gl.c
>         piglit-vbo.cpp
>         sized-internalformats.c
> @@ -30,7 +29,6 @@ IF(BUILD_GLX_TESTS)
>         piglit_add_library (piglitglxutil
>                     piglit-shader.c
>                     piglit-shader-gl.c
> -                   piglit-transform-feedback.c
>                     piglit-util-gl-common.c
>                     piglit-util-gl-enum.c
>                     piglit-util-gl.c
> diff --git a/tests/util/piglit-transform-feedback.c b/tests/util/piglit-transform-feedback.c
> deleted file mode 100644
> index 173d32d..0000000
> --- a/tests/util/piglit-transform-feedback.c
> +++ /dev/null
> @@ -1,43 +0,0 @@
> -/*
> - * Copyright © 2011 Intel Corporation
> - *
> - * Permission is hereby granted, free of charge, to any person obtaining a
> - * copy of this software and associated documentation files (the "Software"),
> - * to deal in the Software without restriction, including without limitation
> - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> - * and/or sell copies of the Software, and to permit persons to whom the
> - * Software is furnished to do so, subject to the following conditions:
> - *
> - * The above copyright notice and this permission notice (including the next
> - * paragraph) shall be included in all copies or substantial portions of the
> - * Software.
> - *
> - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> - * DEALINGS IN THE SOFTWARE.
> - */
> -
> -#ifndef USE_OPENGL
> -#      error USE_OPENGL is undefined
> -#endif
> -
> -#if defined(_MSC_VER)
> -#include <windows.h>
> -#endif
> -
> -#include "piglit-util-gl-common.h"
> -
> -void
> -piglit_require_transform_feedback(void)
> -{
> -       if (!(piglit_get_gl_version() >= 30 ||
> -             piglit_is_extension_supported("GL_EXT_transform_feedback"))) {
> -               printf("Transform feedback not supported.\n");
> -               piglit_report_result(PIGLIT_SKIP);
> -               exit(1);
> -       }
> -}
> diff --git a/tests/util/piglit-transform-feedback.h b/tests/util/piglit-transform-feedback.h
> deleted file mode 100644
> index 312bb85..0000000
> --- a/tests/util/piglit-transform-feedback.h
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -/*
> - * Copyright © 2011 Intel Corporation
> - *
> - * Permission is hereby granted, free of charge, to any person obtaining a
> - * copy of this software and associated documentation files (the "Software"),
> - * to deal in the Software without restriction, including without limitation
> - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> - * and/or sell copies of the Software, and to permit persons to whom the
> - * Software is furnished to do so, subject to the following conditions:
> - *
> - * The above copyright notice and this permission notice (including the next
> - * paragraph) shall be included in all copies or substantial portions of the
> - * Software.
> - *
> - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> - * DEALINGS IN THE SOFTWARE.
> - */
> -
> -#pragma once
> -
> -/**
> - * Require transform feedback.
> - *
> - * Transform feedback may either be provided by GL 3.0 or
> - * EXT_transform_feedback.
> - */
> -extern void piglit_require_transform_feedback(void);
> diff --git a/tests/util/piglit-util-gl-common.h b/tests/util/piglit-util-gl-common.h
> index ca30e6d..d2e6b3e 100644
> --- a/tests/util/piglit-util-gl-common.h
> +++ b/tests/util/piglit-util-gl-common.h
> @@ -38,7 +38,6 @@ extern "C" {
>
>  #include "piglit-framework.h"
>  #include "piglit-shader.h"
> -#include "piglit-transform-feedback.h"
>
>  extern const uint8_t fdo_bitmap[];
>  extern const unsigned int fdo_bitmap_width;
> @@ -170,6 +169,7 @@ GLuint piglit_rgbw_texture(GLenum format, int w, int h, GLboolean mip,
>  GLuint piglit_depth_texture(GLenum target, GLenum format, int w, int h, int d, GLboolean mip);
>  extern float piglit_tolerance[4];
>  void piglit_set_tolerance_for_bits(int rbits, int gbits, int bbits, int abits);
> +extern void piglit_require_transform_feedback(void);
>
>  extern GLfloat cube_face_texcoords[6][4][3];
>  extern const char *cube_face_names[6];
> diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
> index 2f08ba4..f54f58e 100644
> --- a/tests/util/piglit-util-gl.c
> +++ b/tests/util/piglit-util-gl.c
> @@ -1338,3 +1338,20 @@ piglit_depth_texture(GLenum target, GLenum internalformat, int w, int h, int d,
>         free(data);
>         return tex;
>  }
> +
> +/**
> + * Require transform feedback.
> + *
> + * Transform feedback may either be provided by GL 3.0 or
> + * EXT_transform_feedback.
> + */
> +void
> +piglit_require_transform_feedback(void)
> +{
> +       if (!(piglit_get_gl_version() >= 30 ||
> +             piglit_is_extension_supported("GL_EXT_transform_feedback"))) {
> +               printf("Transform feedback not supported.\n");
> +               piglit_report_result(PIGLIT_SKIP);
> +               exit(1);
> +       }
> +}
> --
> 1.7.7.6
>


More information about the Piglit mailing list