ext_gpu_shader4: add compiler tests for everything
[piglit.git] / tests / spec / gles-2.0 / minmax.c
blob52ef1f5e8a4c00f0037bf4980f2aba7d0d21c86c
1 /* Copyright © 2013 Linaro
3 * Permission is hereby granted, free of charge, to any person obtaining a
4 * copy of this software and associated documentation files (the "Software"),
5 * to deal in the Software without restriction, including without limitation
6 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 * and/or sell copies of the Software, and to permit persons to whom the
8 * Software is furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice (including the next
11 * paragraph) shall be included in all copies or substantial portions of the
12 * Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 * IN THE SOFTWARE.
23 #include "piglit-util-gl.h"
24 #include "minmax-test.h"
26 PIGLIT_GL_TEST_CONFIG_BEGIN
28 config.supports_gl_es_version = 20;
30 PIGLIT_GL_TEST_CONFIG_END
32 enum piglit_result
33 piglit_display(void)
35 return PIGLIT_FAIL;
38 void
39 piglit_init(int argc, char **argv)
41 /* Taken from es_full_spec_2.0.25, Chapture 6.2
42 * If the value's type is listed as Z in a spec table, then consider
43 * its type to be a signed int (that is, GLint). If the
44 * value's type is listed as Z^+, then consider its type to be
45 * unsigned (that is, GLuint).
48 piglit_print_minmax_header();
50 /* Table 6.18 */
51 piglit_test_min_uint(GL_SUBPIXEL_BITS, 4);
52 piglit_test_min_uint(GL_MAX_TEXTURE_SIZE, 64);
53 piglit_test_min_uint(GL_MAX_CUBE_MAP_TEXTURE_SIZE, 16);
54 piglit_test_min_viewport_dimensions();
55 piglit_test_range_float(GL_ALIASED_POINT_SIZE_RANGE, 1, 1);
56 piglit_test_range_float(GL_ALIASED_LINE_WIDTH_RANGE, 1, 1);
57 piglit_test_min_uint(GL_SAMPLE_BUFFERS, 0);
58 piglit_test_min_uint(GL_SAMPLES, 0);
59 piglit_test_min_int(GL_NUM_COMPRESSED_TEXTURE_FORMATS, 0);
61 /* Table 6.19 */
62 piglit_test_min_int(GL_NUM_SHADER_BINARY_FORMATS, 0);
64 /* Table 6.20 */
65 piglit_test_min_uint(GL_MAX_VERTEX_ATTRIBS, 8);
66 piglit_test_min_uint(GL_MAX_VERTEX_UNIFORM_VECTORS, 128);
67 piglit_test_min_uint(GL_MAX_VARYING_VECTORS, 8);
68 piglit_test_min_uint(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, 8);
69 piglit_test_min_uint(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, 0);
70 piglit_test_min_uint(GL_MAX_TEXTURE_IMAGE_UNITS, 8);
71 piglit_test_min_uint(GL_MAX_FRAGMENT_UNIFORM_VECTORS, 16);
72 piglit_test_min_uint(GL_MAX_RENDERBUFFER_SIZE, 1);
74 if (!piglit_check_gl_error(GL_NO_ERROR))
75 piglit_report_result(PIGLIT_FAIL);
77 piglit_report_result(piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL);