glx-multithread-texture: Avoid front-buffer rendering.
[piglit.git] / tests / util / piglit-shader.h
blob8b405c3503a47433d638f08d8834e989e40e53e9
1 /*
2 * Copyright (c) The Piglit project 2007
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, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
18 * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
19 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
21 * USE OR OTHER DEALINGS IN THE SOFTWARE.
24 #pragma once
26 /**
27 * Null parameters are ignored.
29 * \param es Is it GLSL ES?
31 void piglit_get_glsl_version(bool *es, int* major, int* minor);
33 GLuint piglit_compile_shader(GLenum target, const char *filename);
34 GLuint piglit_compile_shader_text_nothrow(GLenum target, const char *text, bool err_to_stderr);
35 GLuint piglit_compile_shader_text(GLenum target, const char *text);
36 GLuint piglit_compile_shader_formatted(GLenum target, const char *fmt, ...) PRINTFLIKE(2, 3);
37 GLboolean piglit_link_check_status(GLint prog);
38 GLboolean piglit_link_check_status_quiet(GLint prog);
39 GLint piglit_link_simple_program(GLint vs, GLint fs);
40 GLint piglit_build_simple_program(const char *vs_source, const char *fs_source);
41 GLuint piglit_build_simple_program_unlinked(const char *vs_source,
42 const char *fs_source);
43 GLint piglit_link_simple_program_multiple_shaders(GLint shader1, ...);
44 GLint piglit_build_simple_program_unlinked_multiple_shaders_v(GLenum target1,
45 const char*source1,
46 va_list ap);
47 GLint piglit_build_simple_program_unlinked_multiple_shaders(GLenum target1,
48 const char *source1,
49 ...);
50 GLint piglit_build_simple_program_multiple_shaders(GLenum target1,
51 const char *source1,
52 ...);
53 GLuint piglit_assemble_spirv(GLenum target,
54 size_t source_length,
55 const char *source);
57 extern GLboolean piglit_program_pipeline_check_status(GLuint pipeline);
58 extern GLboolean piglit_program_pipeline_check_status_quiet(GLuint pipeline);
60 /**
61 * Require a specific version of GLSL.
63 * \param version Integer version, for example 130
65 extern void piglit_require_GLSL_version(int version);
66 /** Require any version of GLSL */
67 extern void piglit_require_GLSL(void);
68 extern void piglit_require_fragment_shader(void);
69 extern void piglit_require_vertex_shader(void);