Commit ee2d32a3 authored by Shuang He's avatar Shuang He Committed by root
Browse files

clear-accum: New test for i965 driver bug

v4: Fix probing only half of rendering result (Thanks for Brian Paul)
v3: Add test case to all.tests
v2: Verify result of clearing accum buffer (Brian Paul's suggestion)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43783

Reviewed-by: Brian Paul's avatarBrian Paul <brianp@vmware.com>
Signed-off-by: Shuang He's avatarShuang He <shuang.he@intel.com>
parent d341efac
......@@ -312,6 +312,7 @@ add_plain_test(general, 'vbo-map-remap')
add_plain_test(general, 'vbo-subdata-sync')
add_plain_test(general, 'vbo-subdata-zero')
add_plain_test(general, 'windowoverlap')
add_plain_test(general, 'clear-accum')
add_fbo_depthstencil_tests(general, 'default_fb')
shaders = Group()
......
......@@ -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:
/*
* 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@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)
{
GLboolean pass = GL_TRUE;
static float green[] = {0.0, 1.0, 0.0, 0.0};
glClearAccum(0, 1, 0, 0);
glClear(GL_ACCUM_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
glAccum(GL_RETURN, 1.0);
pass &= piglit_probe_rect_rgb(0, 0, piglit_width, piglit_height, green);
if (pass)
piglit_report_result(PIGLIT_PASS);
else
piglit_report_result(PIGLIT_FAIL);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment