[Piglit] [PATCH] clear-accum: New test for i965 driver bug

Brian Paul brianp at vmware.com
Mon Jan 2 06:37:05 PST 2012


On 12/30/2011 08:17 PM, Shuang He wrote:
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43783
> Signed-off-by: Shuang He<shuang.he at intel.com>
> ---
>   tests/general/CMakeLists.gl.txt |    1 +
>   tests/general/clear-accum.c     |   51 +++++++++++++++++++++++++++++++++++++++
>   2 files changed, 52 insertions(+), 0 deletions(-)
>   create mode 100644 tests/general/clear-accum.c
>
> diff --git a/tests/general/CMakeLists.gl.txt b/tests/general/CMakeLists.gl.txt
> index f8c5ddf..90711c6 100644
> --- a/tests/general/CMakeLists.gl.txt
> +++ b/tests/general/CMakeLists.gl.txt
> @@ -124,5 +124,6 @@ add_executable (object_purgeable-api-vbo object_purgeable-api-vbo.c object_purge
>   add_executable (occlusion_query occlusion_query.c)
>   add_executable (occlusion-query-discard occlusion-query-discard.c)
>   add_executable (quad-invariance quad-invariance.c)
> +add_executable (clear-accum clear-accum.c)
>
>   # vim: ft=cmake:
> diff --git a/tests/general/clear-accum.c b/tests/general/clear-accum.c
> new file mode 100644
> index 0000000..5145620
> --- /dev/null
> +++ b/tests/general/clear-accum.c
> @@ -0,0 +1,51 @@
> +/*
> + * 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.
> + *
> + * Authors:
> + *    Shuang He<shuang.he at intel.com>
> + *
> + */
> +
> +/** @file clear_accum.c
> + *
> + * Tests that clear accum buffer
> + */
> +
> +#include "piglit-util.h"
> +
> +int piglit_width = 400;
> +int piglit_height = 200;
> +int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ACCUM;
> +
> +enum piglit_result
> +piglit_display(void)
> +{
> +	return PIGLIT_PASS;
> +}
> +
> +void
> +piglit_init(int argc, char **argv)
> +{
> +	glClear(GL_ACCUM_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
> +
> +	piglit_report_result(PIGLIT_PASS);
> +}

What exactly is this testing?  If you're clearing the accum buffer, 
don't you want to verify that it worked?

-Brian



More information about the Piglit mailing list