Commit f350074d authored by Eric Anholt's avatar Eric Anholt

ati-fs-bad-delete: Test case for a null deref in Mesa found by clang.

parent a429beee
......@@ -104,6 +104,7 @@ add_plain_test(general, 'windowoverlap')
add_plain_test(general, 'sync_api')
shaders = Group()
add_plain_test(shaders, 'ati-fs-bad-delete')
add_plain_test(shaders, 'trinity-fp1')
add_plain_test(shaders, 'fp-abs-01')
add_plain_test(shaders, 'fp-abs-02')
......
......@@ -23,6 +23,7 @@ link_libraries (
add_definitions ( -DSOURCE_DIR="\\\"${piglit_SOURCE_DIR}/\\\"" )
add_executable (ati-fs-bad-delete ati-fs-bad-delete.c)
add_executable (trinity-fp1 trinity-fp1.c)
add_executable (fp-abs-01 fp-abs-01.c)
add_executable (fp-abs-02 fp-abs-02.c)
......
/*
* Copyright © 2009 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:
* Eric Anholt <eric@anholt.net>
*
*/
/**
* @file ati-fs-bad-delete.c
*
* Tests that ATI_fragment_shader's delete works correctly on an undefined
* shader.
*/
#include "piglit-util.h"
int piglit_width = 128, piglit_height = 128;
int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE;
enum piglit_result
piglit_display(void)
{
glDeleteFragmentShaderATI(1001);
return glGetError() == 0 ? PIGLIT_SUCCESS : PIGLIT_FAILURE;
}
void piglit_init(int argc, char **argv)
{
piglit_automatic = GL_TRUE;
piglit_require_extension("GL_ATI_fragment_shader");
}
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