2 * Copyright (c) 2010 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
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 VMWARE 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
26 * @file texel-offset-limits.c
28 * Tests that GLSL 1.30 exposes the GL_MIN/MAX_PROGRAM_TEXEL_OFFSET limits.
31 #include "piglit-util-gl.h"
33 PIGLIT_GL_TEST_CONFIG_BEGIN
35 config
.supports_gl_compat_version
= 10;
37 config
.window_width
= 10;
38 config
.window_height
= 10;
39 config
.window_visual
= PIGLIT_GL_VISUAL_RGBA
| PIGLIT_GL_VISUAL_DOUBLE
;
40 config
.khr_no_error_support
= PIGLIT_NO_ERRORS
;
42 PIGLIT_GL_TEST_CONFIG_END
52 piglit_init(int argc
, char **argv
)
57 piglit_require_GLSL_version(130);
59 glGetIntegerv(GL_MIN_PROGRAM_TEXEL_OFFSET
, &val
);
60 if (!piglit_check_gl_error(GL_NO_ERROR
))
61 piglit_report_result(PIGLIT_FAIL
);
64 "query of GL_MIN_PROGRAM_TEXEL_OFFSET "
65 "returned %d, must be at least -8\n",
70 glGetIntegerv(GL_MAX_PROGRAM_TEXEL_OFFSET
, &val
);
71 if (!piglit_check_gl_error(GL_NO_ERROR
))
72 piglit_report_result(PIGLIT_FAIL
);
75 "query of GL_MAX_PROGRAM_TEXEL_OFFSET "
76 "returned %d, must be at least 7\n",
81 piglit_report_result(pass
? PIGLIT_PASS
: PIGLIT_FAIL
);