1 //
2 // Copyright 2018 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // validationES31.h:
7 //  Inlined validation functions for OpenGL ES 3.1 entry points.
8 
9 #ifndef LIBANGLE_VALIDATION_ES31_H_
10 #define LIBANGLE_VALIDATION_ES31_H_
11 
12 #include "libANGLE/ErrorStrings.h"
13 #include "libANGLE/validationES31_autogen.h"
14 
15 namespace gl
16 {
17 
18 bool ValidateTexBufferBase(const Context *context,
19                            TextureType target,
20                            GLenum internalformat,
21                            BufferID bufferPacked);
22 bool ValidateTexBufferRangeBase(const Context *context,
23                                 TextureType target,
24                                 GLenum internalformat,
25                                 BufferID bufferPacked,
26                                 GLintptr offset,
27                                 GLsizeiptr size);
28 
29 // GL_EXT_separate_shader_objects
30 bool ValidateActiveShaderProgramBase(const Context *context,
31                                      ProgramPipelineID pipelinePacked,
32                                      ShaderProgramID programPacked);
33 bool ValidateBindProgramPipelineBase(const Context *context, ProgramPipelineID pipelinePacked);
34 bool ValidateCreateShaderProgramvBase(const Context *context,
35                                       ShaderType typePacked,
36                                       GLsizei count,
37                                       const GLchar **strings);
38 bool ValidateDeleteProgramPipelinesBase(const Context *context,
39                                         GLsizei n,
40                                         const ProgramPipelineID *pipelinesPacked);
41 bool ValidateGenProgramPipelinesBase(const Context *context,
42                                      GLsizei n,
43                                      const ProgramPipelineID *pipelinesPacked);
44 bool ValidateGetProgramPipelineInfoLogBase(const Context *context,
45                                            ProgramPipelineID pipelinePacked,
46                                            GLsizei bufSize,
47                                            const GLsizei *length,
48                                            const GLchar *infoLog);
49 bool ValidateGetProgramPipelineivBase(const Context *context,
50                                       ProgramPipelineID pipelinePacked,
51                                       GLenum pname,
52                                       const GLint *params);
53 bool ValidateIsProgramPipelineBase(const Context *context, ProgramPipelineID pipelinePacked);
54 bool ValidateProgramParameteriBase(const Context *context,
55                                    ShaderProgramID programPacked,
56                                    GLenum pname,
57                                    GLint value);
58 bool ValidateProgramUniform1fBase(const Context *context,
59                                   ShaderProgramID programPacked,
60                                   UniformLocation locationPacked,
61                                   GLfloat v0);
62 bool ValidateProgramUniform1fvBase(const Context *context,
63                                    ShaderProgramID programPacked,
64                                    UniformLocation locationPacked,
65                                    GLsizei count,
66                                    const GLfloat *value);
67 bool ValidateProgramUniform1iBase(const Context *context,
68                                   ShaderProgramID programPacked,
69                                   UniformLocation locationPacked,
70                                   GLint v0);
71 bool ValidateProgramUniform1ivBase(const Context *context,
72                                    ShaderProgramID programPacked,
73                                    UniformLocation locationPacked,
74                                    GLsizei count,
75                                    const GLint *value);
76 bool ValidateProgramUniform1uiBase(const Context *context,
77                                    ShaderProgramID programPacked,
78                                    UniformLocation locationPacked,
79                                    GLuint v0);
80 bool ValidateProgramUniform1uivBase(const Context *context,
81                                     ShaderProgramID programPacked,
82                                     UniformLocation locationPacked,
83                                     GLsizei count,
84                                     const GLuint *value);
85 bool ValidateProgramUniform2fBase(const Context *context,
86                                   ShaderProgramID programPacked,
87                                   UniformLocation locationPacked,
88                                   GLfloat v0,
89                                   GLfloat v1);
90 bool ValidateProgramUniform2fvBase(const Context *context,
91                                    ShaderProgramID programPacked,
92                                    UniformLocation locationPacked,
93                                    GLsizei count,
94                                    const GLfloat *value);
95 bool ValidateProgramUniform2iBase(const Context *context,
96                                   ShaderProgramID programPacked,
97                                   UniformLocation locationPacked,
98                                   GLint v0,
99                                   GLint v1);
100 bool ValidateProgramUniform2ivBase(const Context *context,
101                                    ShaderProgramID programPacked,
102                                    UniformLocation locationPacked,
103                                    GLsizei count,
104                                    const GLint *value);
105 bool ValidateProgramUniform2uiBase(const Context *context,
106                                    ShaderProgramID programPacked,
107                                    UniformLocation locationPacked,
108                                    GLuint v0,
109                                    GLuint v1);
110 bool ValidateProgramUniform2uivBase(const Context *context,
111                                     ShaderProgramID programPacked,
112                                     UniformLocation locationPacked,
113                                     GLsizei count,
114                                     const GLuint *value);
115 bool ValidateProgramUniform3fBase(const Context *context,
116                                   ShaderProgramID programPacked,
117                                   UniformLocation locationPacked,
118                                   GLfloat v0,
119                                   GLfloat v1,
120                                   GLfloat v2);
121 bool ValidateProgramUniform3fvBase(const Context *context,
122                                    ShaderProgramID programPacked,
123                                    UniformLocation locationPacked,
124                                    GLsizei count,
125                                    const GLfloat *value);
126 bool ValidateProgramUniform3iBase(const Context *context,
127                                   ShaderProgramID programPacked,
128                                   UniformLocation locationPacked,
129                                   GLint v0,
130                                   GLint v1,
131                                   GLint v2);
132 bool ValidateProgramUniform3ivBase(const Context *context,
133                                    ShaderProgramID programPacked,
134                                    UniformLocation locationPacked,
135                                    GLsizei count,
136                                    const GLint *value);
137 bool ValidateProgramUniform3uiBase(const Context *context,
138                                    ShaderProgramID programPacked,
139                                    UniformLocation locationPacked,
140                                    GLuint v0,
141                                    GLuint v1,
142                                    GLuint v2);
143 bool ValidateProgramUniform3uivBase(const Context *context,
144                                     ShaderProgramID programPacked,
145                                     UniformLocation locationPacked,
146                                     GLsizei count,
147                                     const GLuint *value);
148 bool ValidateProgramUniform4fBase(const Context *context,
149                                   ShaderProgramID programPacked,
150                                   UniformLocation locationPacked,
151                                   GLfloat v0,
152                                   GLfloat v1,
153                                   GLfloat v2,
154                                   GLfloat v3);
155 bool ValidateProgramUniform4fvBase(const Context *context,
156                                    ShaderProgramID programPacked,
157                                    UniformLocation locationPacked,
158                                    GLsizei count,
159                                    const GLfloat *value);
160 bool ValidateProgramUniform4iBase(const Context *context,
161                                   ShaderProgramID programPacked,
162                                   UniformLocation locationPacked,
163                                   GLint v0,
164                                   GLint v1,
165                                   GLint v2,
166                                   GLint v3);
167 bool ValidateProgramUniform4ivBase(const Context *context,
168                                    ShaderProgramID programPacked,
169                                    UniformLocation locationPacked,
170                                    GLsizei count,
171                                    const GLint *value);
172 bool ValidateProgramUniform4uiBase(const Context *context,
173                                    ShaderProgramID programPacked,
174                                    UniformLocation locationPacked,
175                                    GLuint v0,
176                                    GLuint v1,
177                                    GLuint v2,
178                                    GLuint v3);
179 bool ValidateProgramUniform4uivBase(const Context *context,
180                                     ShaderProgramID programPacked,
181                                     UniformLocation locationPacked,
182                                     GLsizei count,
183                                     const GLuint *value);
184 bool ValidateProgramUniformMatrix2fvBase(const Context *context,
185                                          ShaderProgramID programPacked,
186                                          UniformLocation locationPacked,
187                                          GLsizei count,
188                                          GLboolean transpose,
189                                          const GLfloat *value);
190 bool ValidateProgramUniformMatrix2x3fvBase(const Context *context,
191                                            ShaderProgramID programPacked,
192                                            UniformLocation locationPacked,
193                                            GLsizei count,
194                                            GLboolean transpose,
195                                            const GLfloat *value);
196 bool ValidateProgramUniformMatrix2x4fvBase(const Context *context,
197                                            ShaderProgramID programPacked,
198                                            UniformLocation locationPacked,
199                                            GLsizei count,
200                                            GLboolean transpose,
201                                            const GLfloat *value);
202 bool ValidateProgramUniformMatrix3fvBase(const Context *context,
203                                          ShaderProgramID programPacked,
204                                          UniformLocation locationPacked,
205                                          GLsizei count,
206                                          GLboolean transpose,
207                                          const GLfloat *value);
208 bool ValidateProgramUniformMatrix3x2fvBase(const Context *context,
209                                            ShaderProgramID programPacked,
210                                            UniformLocation locationPacked,
211                                            GLsizei count,
212                                            GLboolean transpose,
213                                            const GLfloat *value);
214 bool ValidateProgramUniformMatrix3x4fvBase(const Context *context,
215                                            ShaderProgramID programPacked,
216                                            UniformLocation locationPacked,
217                                            GLsizei count,
218                                            GLboolean transpose,
219                                            const GLfloat *value);
220 bool ValidateProgramUniformMatrix4fvBase(const Context *context,
221                                          ShaderProgramID programPacked,
222                                          UniformLocation locationPacked,
223                                          GLsizei count,
224                                          GLboolean transpose,
225                                          const GLfloat *value);
226 bool ValidateProgramUniformMatrix4x2fvBase(const Context *context,
227                                            ShaderProgramID programPacked,
228                                            UniformLocation locationPacked,
229                                            GLsizei count,
230                                            GLboolean transpose,
231                                            const GLfloat *value);
232 bool ValidateProgramUniformMatrix4x3fvBase(const Context *context,
233                                            ShaderProgramID programPacked,
234                                            UniformLocation locationPacked,
235                                            GLsizei count,
236                                            GLboolean transpose,
237                                            const GLfloat *value);
238 bool ValidateUseProgramStagesBase(const Context *context,
239                                   ProgramPipelineID pipelinePacked,
240                                   GLbitfield stages,
241                                   ShaderProgramID programPacked);
242 bool ValidateValidateProgramPipelineBase(const Context *context, ProgramPipelineID pipelinePacked);
243 }  // namespace gl
244 
245 #endif  // LIBANGLE_VALIDATION_ES31_H_
246