framework/replay: disable AA accounting when comparing with no tolerance
[piglit.git] / tests / spec / gl-4.3 / get_glsl_versions.c
blob4a6d42d50b4531a6404d5bf9e1fbfc8f36eaaa55
1 /*
2 * Copyright 2017 VMware, Inc.
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 * on the rights to use, copy, modify, merge, publish, distribute, sub
8 * license, and/or sell copies of the Software, and to permit persons to whom
9 * the 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,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 * NON-INFRINGEMENT. IN NO EVENT SHALL AUTHORS AND/OR THEIR SUPPLIERS
19 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
26 #include "piglit-util-gl.h"
27 #include "minmax-test.h"
30 PIGLIT_GL_TEST_CONFIG_BEGIN
31 config.supports_gl_core_version = 43;
32 config.khr_no_error_support = PIGLIT_NO_ERRORS;
33 PIGLIT_GL_TEST_CONFIG_END
36 void
37 piglit_init(int argc, char *argv[])
39 GLint num = -1;
40 GLint i;
42 glGetIntegerv(GL_NUM_SHADING_LANGUAGE_VERSIONS, &num);
43 if (!piglit_check_gl_error(GL_NO_ERROR)) {
44 piglit_report_result(PIGLIT_FAIL);
46 if (num < 1) {
47 printf("Invalid number of shading language versions\n");
48 piglit_report_result(PIGLIT_FAIL);
51 for (i = 0; i < num; i++) {
52 const GLubyte *v = glGetStringi(GL_SHADING_LANGUAGE_VERSION, i);
53 if (!v) {
54 printf("Invalid glGetStringi(index=%d) result\n", i);
55 piglit_report_result(PIGLIT_FAIL);
57 if (v[0] != 0 && !(v[0] >= '1' && v[0] <= '9')) {
58 printf("Invalid GLSL version string: %s\n", v);
59 piglit_report_result(PIGLIT_FAIL);
61 //printf("%d: %s\n", i, (const char *) v);
64 if (!piglit_check_gl_error(GL_NO_ERROR)) {
65 piglit_report_result(PIGLIT_FAIL);
68 piglit_report_result(PIGLIT_PASS);
72 enum piglit_result
73 piglit_display(void)
75 return PIGLIT_PASS;