ext_gpu_shader4: add compiler tests for everything
[piglit.git] / tests / spec / arb_shader_storage_buffer_object / minmax.c
blobbb0385ec4ef78f586930e406201c87ab03600706
1 /*
2 * Copyright © 2015 Aditya Atluri <adityaavinash1@gmail.com>
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
21 * DEALINGS IN THE SOFTWARE.
24 /** \file
26 * Test for the minimum and maximum values specified in the
27 * ARB_shader_storage_buffer_object spec.
29 #include "piglit-util-gl.h"
30 #include "minmax-test.h"
32 PIGLIT_GL_TEST_CONFIG_BEGIN
34 config.supports_gl_compat_version = 40;
35 config.supports_gl_core_version = 40;
36 config.khr_no_error_support = PIGLIT_NO_ERRORS;
38 PIGLIT_GL_TEST_CONFIG_END
40 enum piglit_result
41 piglit_display(void)
43 /* UNREACHED */
44 return PIGLIT_FAIL;
47 void
48 piglit_init(int argc, char **argv)
50 piglit_require_extension("GL_ARB_shader_storage_buffer_object");
51 piglit_print_minmax_header();
53 piglit_test_min_int(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, 0);
54 piglit_test_min_int(GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS, 0);
55 piglit_test_min_int(GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS, 0);
56 piglit_test_min_int(GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS, 0);
57 piglit_test_min_int(GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS, 8);
58 piglit_test_min_int(GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS, 8);
59 piglit_test_min_int(GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS, 8);
60 piglit_test_min_int(GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS, 8);
61 piglit_test_min_int64(GL_MAX_SHADER_STORAGE_BLOCK_SIZE, 16777216); // 2^24
62 piglit_test_max_int(GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT, 256);
63 piglit_test_min_int(GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES, 8);
65 if (!piglit_check_gl_error(GL_NO_ERROR))
66 piglit_report_result(PIGLIT_FAIL);
67 piglit_report_result(piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL);