[Piglit] [PATCH] arb_blend_func_extended: add three api tests

Eric Anholt eric at anholt.net
Mon Nov 21 11:30:40 PST 2011


On Sun, 20 Nov 2011 19:00:41 +0000, Dave Airlie <airlied at gmail.com> wrote:

> Signed-off-by: Dave Airlie <airlied at linux.ie>
> ---
>  tests/spec/CMakeLists.txt                          |    1 +
>  tests/spec/arb_blend_func_extended/CMakeLists.txt  |    2 +
>  .../arb_blend_func_extended/api/CMakeLists.gl.txt  |   18 +++
>  .../arb_blend_func_extended/api/CMakeLists.txt     |    1 +
>  .../api/bindfragdataindexed-invalid-parameters.c   |  121 +++++++++++++++++++
>  tests/spec/arb_blend_func_extended/api/blend-api.c |   92 ++++++++++++++
>  .../arb_blend_func_extended/api/getfragdataindex.c |  127 ++++++++++++++++++++
>  7 files changed, 362 insertions(+), 0 deletions(-)
>  create mode 100644 tests/spec/arb_blend_func_extended/CMakeLists.txt
>  create mode 100644 tests/spec/arb_blend_func_extended/api/CMakeLists.gl.txt
>  create mode 100644 tests/spec/arb_blend_func_extended/api/CMakeLists.txt
>  create mode 100644 tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c
>  create mode 100644 tests/spec/arb_blend_func_extended/api/blend-api.c
>  create mode 100644 tests/spec/arb_blend_func_extended/api/getfragdataindex.c
> 
> diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt
> index 23893dd..863d583 100644
> --- a/tests/spec/CMakeLists.txt
> +++ b/tests/spec/CMakeLists.txt
> @@ -36,3 +36,4 @@ add_subdirectory (arb_vertex_type_2_10_10_10_rev)
>  add_subdirectory (ext_texture_integer)
>  add_subdirectory (arb_draw_buffers)
>  add_subdirectory (oes_draw_texture)
> +add_subdirectory (arb_blend_func_extended)
> diff --git a/tests/spec/arb_blend_func_extended/CMakeLists.txt b/tests/spec/arb_blend_func_extended/CMakeLists.txt
> new file mode 100644
> index 0000000..6903d88
> --- /dev/null
> +++ b/tests/spec/arb_blend_func_extended/CMakeLists.txt
> @@ -0,0 +1,2 @@
> +add_subdirectory (api)
> +piglit_include_target_api()
> \ No newline at end of file
> diff --git a/tests/spec/arb_blend_func_extended/api/CMakeLists.gl.txt b/tests/spec/arb_blend_func_extended/api/CMakeLists.gl.txt
> new file mode 100644
> index 0000000..a6a1067
> --- /dev/null
> +++ b/tests/spec/arb_blend_func_extended/api/CMakeLists.gl.txt
> @@ -0,0 +1,18 @@
> +include_directories(
> +	${GLEXT_INCLUDE_DIR}
> +	${OPENGL_INCLUDE_PATH}
> +	${GLUT_INCLUDE_DIR}
> +	${piglit_SOURCE_DIR}/tests/util
> +)
> +
> +link_libraries (
> +	piglitutil
> +	${OPENGL_gl_LIBRARY}
> +	${OPENGL_glu_LIBRARY}
> +	${GLUT_glut_LIBRARY}
> +)
> +
> +add_executable (arb_blend_func_extended-bindfragdataindexed-invalid-parameters bindfragdataindexed-invalid-parameters.c)
> +add_executable (arb_blend_func_extended-getfragdataindex getfragdataindex.c)
> +add_executable (arb_blend_func_extended-blend-api blend-api)
> +# vim: ft=cmake:
> diff --git a/tests/spec/arb_blend_func_extended/api/CMakeLists.txt b/tests/spec/arb_blend_func_extended/api/CMakeLists.txt
> new file mode 100644
> index 0000000..144a306
> --- /dev/null
> +++ b/tests/spec/arb_blend_func_extended/api/CMakeLists.txt
> @@ -0,0 +1 @@
> +piglit_include_target_api()
> diff --git a/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c b/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c
> new file mode 100644
> index 0000000..400efd1
> --- /dev/null
> +++ b/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c
> @@ -0,0 +1,121 @@
> +/* 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.
> + */
> +
> +/**
> + * \file bindfragdataindexed-invalid-parameters.c
> + * Verify that passing invalid parameters to glBindFragDataLocationIndexed
> + * generates the correct errors.
> + *
> + * \author Ian Romanick + Dave Airlie (extended tests)
> + */
> +#include "piglit-util.h"
> +
> +int piglit_width = 100, piglit_height = 100;
> +int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE;
> +
> +enum piglit_result
> +piglit_display(void)
> +{
> +	return PIGLIT_FAIL;
> +}
> +
> +void piglit_init(int argc, char **argv)
> +{
> +	GLint max_draw_buffers, max_dual_source;
> +	GLuint prog;
> +
> +	piglit_require_gl_version(30);
> +	piglit_require_extension("GL_ARB_blend_func_extended");

I was going to say that I don't think you need the GL 3.0 requirement,
as long as you have shaders.  But this test spec is written against GL
1.0 and gpu_shader4 as requirements.  So actually, I don't see why this
spec has all this text about glBindFragDataLocation... Oh.  gpu_shader4
specifies glBindFragDataLocationEXT.

I'd say either use the EXT variants and drop the GL3 requirements, or
drop the duplicated parts of the tests of GL3 glBindFragDataLocation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20111121/b2cbf689/attachment.pgp>


More information about the Piglit mailing list