ext_gpu_shader4: add compiler tests for everything
[piglit.git] / tests / spec / arb_vertex_array_object / delete-object-0.c
blob3fb5d8132efc21545df1a7b3c3aaa32d0afb3bee
1 /*
2 * Copyright © 2018 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 * IN THE SOFTWARE.
24 #include "piglit-util-gl.h"
26 /**
27 * @file delete-object-0.c
29 * The OpenGL 4.6 Core Profile specification (dated May 14, 2018) says:
31 * Unused names in arrays that have been marked as used for the purposes of
32 * GenVertexArrays are marked as unused again. Unused names in arrays are
33 * silently ignored, as is the value zero.
35 * This test verifies the no errors are generated for 0 or for names from
36 * glGenVertexArrays that have not been bound.
39 PIGLIT_GL_TEST_CONFIG_BEGIN
41 config.supports_gl_compat_version = 10;
43 PIGLIT_GL_TEST_CONFIG_END
45 enum piglit_result
46 piglit_display(void)
48 /* UNREACHED */
49 return PIGLIT_FAIL;
52 void
53 piglit_init(int argc, char **argv)
55 GLuint id[3] = { 0, 0, 0 };
56 bool pass = true;
58 piglit_require_gl_version(15);
59 piglit_require_extension("GL_ARB_vertex_array_object");
61 /* After this call to Gen, the id array will contain { 0, id1, id2 }. */
62 glGenVertexArrays(2, &id[1]);
63 glBindVertexArray(id[1]);
64 glBindVertexArray(0);
66 glDeleteVertexArrays(3, id);
68 pass = piglit_check_gl_error(GL_NO_ERROR);
70 piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);