glsl: test loop unroll with uint overflow
[piglit.git] / tests / spec / ext_framebuffer_multisample / draw-buffers-common.h
blob5620fbe0cd2ca6974f7490626413ad525fbe074b
1 /* Copyright © 2012 Intel Corporation
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 "common.h"
25 /**
26 * \file draw-buffers-common.h
27 * This file declares common functions which are used by multiple draw buffer
28 * test cases.
31 /* Allocates all the relevant data arrays required in the test */
32 void allocate_data_arrays(void);
34 /* Draws a test pattern without sample_alpha_to_coverage and
35 * sample_alpha_to_one
37 void draw_reference_image(bool sample_alpha_to_coverage,
38 bool sample_alpha_to_one);
40 /* Draws the test pattern with either sample_alpha_to_coverage or
41 * sample_alpha_to_one enabled
43 void draw_test_image(bool sample_alpha_to_coverage,
44 bool sample_alpha_to_one);
46 /* Frees the previously allocated data arrays */
47 void free_data_arrays(void);
49 /* Initilaizes multisample framebuffer object with multiple draw buffers */
50 void ms_fbo_and_draw_buffers_setup(int samples,
51 int width, int height,
52 int n_attachments,
53 GLenum test_buffers,
54 GLenum color_buffer_zero_format);
56 /* Probe downsampled FBO (resolve_fbo / resolve_int_fbo) to compare against
57 * expected color for each draw buffer.
59 bool probe_framebuffer_color(void);
61 /* Probe downsampled FBO (resolve_fbo) to compare against expected depth values
62 * for each draw buffer.
64 bool probe_framebuffer_depth(void);
66 void shader_compile(bool sample_alpha_to_coverage,
67 bool dual_src_blend,
68 bool frag_out_zero_write);