r300g: better describe another flush and move it closer to the real problem
[mesa.git] / src / mesa / main / shaders.h
1 /*
2 * Mesa 3-D graphics library
3 * Version: 6.5.3
4 *
5 * Copyright (C) 2004-2007 Brian Paul All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25
26 #ifndef SHADERS_H
27 #define SHADERS_H
28
29
30 #include "glheader.h"
31 #include "mtypes.h"
32
33 extern void
34 _mesa_init_shader_dispatch(struct _glapi_table *exec);
35
36 extern void GLAPIENTRY
37 _mesa_DeleteObjectARB(GLhandleARB obj);
38
39 extern GLhandleARB GLAPIENTRY
40 _mesa_GetHandleARB(GLenum pname);
41
42 extern void GLAPIENTRY
43 _mesa_DetachObjectARB (GLhandleARB, GLhandleARB);
44
45 extern GLhandleARB GLAPIENTRY
46 _mesa_CreateShaderObjectARB (GLenum);
47
48 extern void GLAPIENTRY
49 _mesa_ShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
50
51 extern void GLAPIENTRY
52 _mesa_CompileShaderARB (GLhandleARB);
53
54 extern GLhandleARB GLAPIENTRY
55 _mesa_CreateProgramObjectARB (void);
56
57 extern void GLAPIENTRY
58 _mesa_AttachObjectARB (GLhandleARB, GLhandleARB);
59
60 extern void GLAPIENTRY
61 _mesa_LinkProgramARB (GLhandleARB);
62
63 extern void GLAPIENTRY
64 _mesa_UseProgramObjectARB (GLhandleARB);
65
66 extern void GLAPIENTRY
67 _mesa_ValidateProgramARB (GLhandleARB);
68
69 extern void GLAPIENTRY
70 _mesa_Uniform1fARB (GLint, GLfloat);
71
72 extern void GLAPIENTRY
73 _mesa_Uniform2fARB (GLint, GLfloat, GLfloat);
74
75 extern void GLAPIENTRY
76 _mesa_Uniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
77
78 extern void GLAPIENTRY
79 _mesa_Uniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
80
81 extern void GLAPIENTRY
82 _mesa_Uniform1iARB (GLint, GLint);
83
84 extern void GLAPIENTRY
85 _mesa_Uniform2iARB (GLint, GLint, GLint);
86
87 extern void GLAPIENTRY
88 _mesa_Uniform3iARB (GLint, GLint, GLint, GLint);
89
90 extern void GLAPIENTRY
91 _mesa_Uniform4iARB (GLint, GLint, GLint, GLint, GLint);
92
93 extern void GLAPIENTRY
94 _mesa_Uniform1fvARB (GLint, GLsizei, const GLfloat *);
95
96 extern void GLAPIENTRY
97 _mesa_Uniform2fvARB (GLint, GLsizei, const GLfloat *);
98
99 extern void GLAPIENTRY
100 _mesa_Uniform3fvARB (GLint, GLsizei, const GLfloat *);
101
102 extern void GLAPIENTRY
103 _mesa_Uniform4fvARB (GLint, GLsizei, const GLfloat *);
104
105 extern void GLAPIENTRY
106 _mesa_Uniform1ivARB (GLint, GLsizei, const GLint *);
107
108 extern void GLAPIENTRY
109 _mesa_Uniform2ivARB (GLint, GLsizei, const GLint *);
110
111 extern void GLAPIENTRY
112 _mesa_Uniform3ivARB (GLint, GLsizei, const GLint *);
113
114 extern void GLAPIENTRY
115 _mesa_Uniform4ivARB (GLint, GLsizei, const GLint *);
116
117 extern void GLAPIENTRY
118 _mesa_Uniform1ui(GLint location, GLuint v0);
119
120 extern void GLAPIENTRY
121 _mesa_Uniform2ui(GLint location, GLuint v0, GLuint v1);
122
123 extern void GLAPIENTRY
124 _mesa_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2);
125
126 extern void GLAPIENTRY
127 _mesa_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
128
129 extern void GLAPIENTRY
130 _mesa_Uniform1uiv(GLint location, GLsizei count, const GLuint *value);
131
132 extern void GLAPIENTRY
133 _mesa_Uniform2uiv(GLint location, GLsizei count, const GLuint *value);
134
135 extern void GLAPIENTRY
136 _mesa_Uniform3uiv(GLint location, GLsizei count, const GLuint *value);
137
138 extern void GLAPIENTRY
139 _mesa_Uniform4uiv(GLint location, GLsizei count, const GLuint *value);
140
141
142 extern void GLAPIENTRY
143 _mesa_UniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
144
145 extern void GLAPIENTRY
146 _mesa_UniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
147
148 extern void GLAPIENTRY
149 _mesa_UniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
150
151 extern void GLAPIENTRY
152 _mesa_GetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
153
154 extern void GLAPIENTRY
155 _mesa_GetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
156
157 extern void GLAPIENTRY
158 _mesa_GetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
159
160 extern void GLAPIENTRY
161 _mesa_GetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
162
163 extern GLint GLAPIENTRY
164 _mesa_GetUniformLocationARB (GLhandleARB, const GLcharARB *);
165
166 extern void GLAPIENTRY
167 _mesa_GetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
168
169 extern void GLAPIENTRY
170 _mesa_GetUniformfvARB (GLhandleARB, GLint, GLfloat *);
171
172 extern void GLAPIENTRY
173 _mesa_GetUniformivARB (GLhandleARB, GLint, GLint *);
174
175 extern void GLAPIENTRY
176 _mesa_GetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
177
178 #if FEATURE_ARB_vertex_shader
179
180 extern void GLAPIENTRY
181 _mesa_BindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
182
183 extern void GLAPIENTRY
184 _mesa_GetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
185
186 extern GLint GLAPIENTRY
187 _mesa_GetAttribLocationARB (GLhandleARB, const GLcharARB *);
188
189 #endif /* FEATURE_ARB_vertex_shader */
190
191
192 /* 2.0 */
193 extern void GLAPIENTRY
194 _mesa_AttachShader(GLuint program, GLuint shader);
195
196 extern GLuint GLAPIENTRY
197 _mesa_CreateShader(GLenum);
198
199 extern GLuint GLAPIENTRY
200 _mesa_CreateProgram(void);
201
202 extern void GLAPIENTRY
203 _mesa_DeleteProgram(GLuint program);
204
205 extern void GLAPIENTRY
206 _mesa_DeleteShader(GLuint shader);
207
208 extern void GLAPIENTRY
209 _mesa_DetachShader(GLuint program, GLuint shader);
210
211 extern void GLAPIENTRY
212 _mesa_GetAttachedShaders(GLuint program, GLsizei maxCount,
213 GLsizei *count, GLuint *obj);
214
215 extern void GLAPIENTRY
216 _mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params);
217
218 extern void GLAPIENTRY
219 _mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize,
220 GLsizei *length, GLchar *infoLog);
221
222 extern void GLAPIENTRY
223 _mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params);
224
225 extern void GLAPIENTRY
226 _mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize,
227 GLsizei *length, GLchar *infoLog);
228
229 extern GLboolean GLAPIENTRY
230 _mesa_IsProgram(GLuint program);
231
232 extern GLboolean GLAPIENTRY
233 _mesa_IsShader(GLuint shader);
234
235
236
237 /* 2.1 */
238 extern void GLAPIENTRY
239 _mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
240 const GLfloat *value);
241
242 extern void GLAPIENTRY
243 _mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
244 const GLfloat *value);
245
246 extern void GLAPIENTRY
247 _mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
248 const GLfloat *value);
249
250 extern void GLAPIENTRY
251 _mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
252 const GLfloat *value);
253
254 extern void GLAPIENTRY
255 _mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
256 const GLfloat *value);
257
258 extern void GLAPIENTRY
259 _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
260 const GLfloat *value);
261
262 /* GLES 2.0 */
263 extern void GLAPIENTRY
264 _mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
265 GLint* range, GLint* precision);
266
267 extern void GLAPIENTRY
268 _mesa_ReleaseShaderCompiler(void);
269
270 extern void GLAPIENTRY
271 _mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat,
272 const void* binary, GLint length);
273
274 #endif /* SHADERS_H */