Am 08.04.2016 um 01:44 schrieb Brian Paul: > To test a failing assertion regression in Mesa. > --- > tests/all.py | 1 + > tests/spec/gl-1.0/CMakeLists.gl.txt | 1 + > tests/spec/gl-1.0/simple-readbuffer.c | 55 > +++++++++++++++++++++++++++++++++++ > 3 files changed, 57 insertions(+) > create mode 100644 tests/spec/gl-1.0/simple-readbuffer.c > > diff --git a/tests/all.py b/tests/all.py > index e5a79cc..c7088ca 100644 > --- a/tests/all.py > +++ b/tests/all.py > @@ -1015,6 +1015,7 @@ with profile.group_manager( > g(['gl-1.0-readpixsanity']) > g(['gl-1.0-logicop']) > g(['gl-1.0-no-op-paths']) > + g(['gl-1.0-simple-readbuffer']) > > with profile.group_manager( > PiglitGLTest, > diff --git a/tests/spec/gl-1.0/CMakeLists.gl.txt > b/tests/spec/gl-1.0/CMakeLists.gl.txt > index 80b2fde..219b9b1 100644 > --- a/tests/spec/gl-1.0/CMakeLists.gl.txt > +++ b/tests/spec/gl-1.0/CMakeLists.gl.txt > @@ -29,6 +29,7 @@ piglit_add_executable (gl-1.0-rastercolor rastercolor.c) > piglit_add_executable (gl-1.0-readpixsanity readpix.c) > piglit_add_executable (gl-1.0-readpixels-oob readpixels-oob.c) > piglit_add_executable (gl-1.0-rendermode-feedback rendermode-feedback.c) > +piglit_add_executable (gl-1.0-simple-readbuffer simple-readbuffer.c) > piglit_add_executable (gl-1.0-swapbuffers-behavior swapbuffers-behavior.c) > > # vim: ft=cmake: > diff --git a/tests/spec/gl-1.0/simple-readbuffer.c > b/tests/spec/gl-1.0/simple-readbuffer.c > new file mode 100644 > index 0000000..e5b67bf > --- /dev/null > +++ b/tests/spec/gl-1.0/simple-readbuffer.c > @@ -0,0 +1,55 @@ > +/* > + * Copyright (C) 2016 VMware, Inc. > + * > + * 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. > + */ > + > +/** > + * Test that a single glReadBuffer() call works (doesn't crash) > + */ > + > +#include "piglit-util-gl.h" > + > + > +PIGLIT_GL_TEST_CONFIG_BEGIN > + config.supports_gl_compat_version = 10; > + config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE; > +PIGLIT_GL_TEST_CONFIG_END > + > + > +enum piglit_result > +piglit_display(void) > +{ > + /* never get here */ > + return PIGLIT_PASS; > +} > + > + > +void > +piglit_init(int argc, char **argv) > +{ > + glReadBuffer(GL_FRONT); > + > + if (!piglit_check_gl_error(GL_NO_ERROR)) { > + piglit_report_result(PIGLIT_FAIL); > + } > + > + piglit_report_result(PIGLIT_PASS); > +} >
Is that a new most simple piglit test ;-). Reviewed-by: Roland Scheidegger <srol...@vmware.com> _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit