1 // 2 // Copyright (c) 2016 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 7 // validationES31.h: Validation functions for OpenGL ES 3.1 entry point parameters 8 9 #ifndef LIBANGLE_VALIDATION_ES31_H_ 10 #define LIBANGLE_VALIDATION_ES31_H_ 11 12 #include <GLES3/gl31.h> 13 14 namespace gl 15 { 16 class Context; 17 class ValidationContext; 18 19 bool ValidateGetBooleani_v(Context *context, GLenum target, GLuint index, GLboolean *data); 20 bool ValidateGetBooleani_vRobustANGLE(Context *context, 21 GLenum target, 22 GLuint index, 23 GLsizei bufSize, 24 GLsizei *length, 25 GLboolean *data); 26 27 bool ValidateGetTexLevelParameterfv(Context *context, 28 GLenum target, 29 GLint level, 30 GLenum pname, 31 GLfloat *params); 32 bool ValidateGetTexLevelParameteriv(Context *context, 33 GLenum target, 34 GLint level, 35 GLenum pname, 36 GLint *param); 37 38 bool ValidateTexStorage2DMultisample(Context *context, 39 GLenum target, 40 GLsizei samples, 41 GLint internalFormat, 42 GLsizei width, 43 GLsizei height, 44 GLboolean fixedSampleLocations); 45 bool ValidateGetMultisamplefv(Context *context, GLenum pname, GLuint index, GLfloat *val); 46 47 bool ValidateDrawIndirectBase(Context *context, GLenum mode, const void *indirect); 48 bool ValidateDrawArraysIndirect(Context *context, GLenum mode, const void *indirect); 49 bool ValidateDrawElementsIndirect(Context *context, GLenum mode, GLenum type, const void *indirect); 50 51 bool ValidateProgramUniform1i(Context *context, GLuint program, GLint location, GLint v0); 52 bool ValidateProgramUniform2i(Context *context, GLuint program, GLint location, GLint v0, GLint v1); 53 bool ValidateProgramUniform3i(Context *context, 54 GLuint program, 55 GLint location, 56 GLint v0, 57 GLint v1, 58 GLint v2); 59 bool ValidateProgramUniform4i(Context *context, 60 GLuint program, 61 GLint location, 62 GLint v0, 63 GLint v1, 64 GLint v2, 65 GLint v3); 66 bool ValidateProgramUniform1ui(Context *context, GLuint program, GLint location, GLuint v0); 67 bool ValidateProgramUniform2ui(Context *context, 68 GLuint program, 69 GLint location, 70 GLuint v0, 71 GLuint v1); 72 bool ValidateProgramUniform3ui(Context *context, 73 GLuint program, 74 GLint location, 75 GLuint v0, 76 GLuint v1, 77 GLuint v2); 78 bool ValidateProgramUniform4ui(Context *context, 79 GLuint program, 80 GLint location, 81 GLuint v0, 82 GLuint v1, 83 GLuint v2, 84 GLuint v3); 85 bool ValidateProgramUniform1f(Context *context, GLuint program, GLint location, GLfloat v0); 86 bool ValidateProgramUniform2f(Context *context, 87 GLuint program, 88 GLint location, 89 GLfloat v0, 90 GLfloat v1); 91 bool ValidateProgramUniform3f(Context *context, 92 GLuint program, 93 GLint location, 94 GLfloat v0, 95 GLfloat v1, 96 GLfloat v2); 97 bool ValidateProgramUniform4f(Context *context, 98 GLuint program, 99 GLint location, 100 GLfloat v0, 101 GLfloat v1, 102 GLfloat v2, 103 GLfloat v3); 104 105 bool ValidateProgramUniform1iv(Context *context, 106 GLuint program, 107 GLint location, 108 GLsizei count, 109 const GLint *value); 110 bool ValidateProgramUniform2iv(Context *context, 111 GLuint program, 112 GLint location, 113 GLsizei count, 114 const GLint *value); 115 bool ValidateProgramUniform3iv(Context *context, 116 GLuint program, 117 GLint location, 118 GLsizei count, 119 const GLint *value); 120 bool ValidateProgramUniform4iv(Context *context, 121 GLuint program, 122 GLint location, 123 GLsizei count, 124 const GLint *value); 125 bool ValidateProgramUniform1uiv(Context *context, 126 GLuint program, 127 GLint location, 128 GLsizei count, 129 const GLuint *value); 130 bool ValidateProgramUniform2uiv(Context *context, 131 GLuint program, 132 GLint location, 133 GLsizei count, 134 const GLuint *value); 135 bool ValidateProgramUniform3uiv(Context *context, 136 GLuint program, 137 GLint location, 138 GLsizei count, 139 const GLuint *value); 140 bool ValidateProgramUniform4uiv(Context *context, 141 GLuint program, 142 GLint location, 143 GLsizei count, 144 const GLuint *value); 145 bool ValidateProgramUniform1fv(Context *context, 146 GLuint program, 147 GLint location, 148 GLsizei count, 149 const GLfloat *value); 150 bool ValidateProgramUniform2fv(Context *context, 151 GLuint program, 152 GLint location, 153 GLsizei count, 154 const GLfloat *value); 155 bool ValidateProgramUniform3fv(Context *context, 156 GLuint program, 157 GLint location, 158 GLsizei count, 159 const GLfloat *value); 160 bool ValidateProgramUniform4fv(Context *context, 161 GLuint program, 162 GLint location, 163 GLsizei count, 164 const GLfloat *value); 165 bool ValidateProgramUniformMatrix2fv(Context *context, 166 GLuint program, 167 GLint location, 168 GLsizei count, 169 GLboolean transpose, 170 const GLfloat *value); 171 bool ValidateProgramUniformMatrix2fv(Context *context, 172 GLuint program, 173 GLint location, 174 GLsizei count, 175 GLboolean transpose, 176 const GLfloat *value); 177 bool ValidateProgramUniformMatrix3fv(Context *context, 178 GLuint program, 179 GLint location, 180 GLsizei count, 181 GLboolean transpose, 182 const GLfloat *value); 183 bool ValidateProgramUniformMatrix4fv(Context *context, 184 GLuint program, 185 GLint location, 186 GLsizei count, 187 GLboolean transpose, 188 const GLfloat *value); 189 bool ValidateProgramUniformMatrix2x3fv(Context *context, 190 GLuint program, 191 GLint location, 192 GLsizei count, 193 GLboolean transpose, 194 const GLfloat *value); 195 bool ValidateProgramUniformMatrix3x2fv(Context *context, 196 GLuint program, 197 GLint location, 198 GLsizei count, 199 GLboolean transpose, 200 const GLfloat *value); 201 bool ValidateProgramUniformMatrix2x4fv(Context *context, 202 GLuint program, 203 GLint location, 204 GLsizei count, 205 GLboolean transpose, 206 const GLfloat *value); 207 bool ValidateProgramUniformMatrix4x2fv(Context *context, 208 GLuint program, 209 GLint location, 210 GLsizei count, 211 GLboolean transpose, 212 const GLfloat *value); 213 bool ValidateProgramUniformMatrix3x4fv(Context *context, 214 GLuint program, 215 GLint location, 216 GLsizei count, 217 GLboolean transpose, 218 const GLfloat *value); 219 bool ValidateProgramUniformMatrix4x3fv(Context *context, 220 GLuint program, 221 GLint location, 222 GLsizei count, 223 GLboolean transpose, 224 const GLfloat *value); 225 226 bool ValidateFramebufferParameteri(Context *context, GLenum target, GLenum pname, GLint param); 227 bool ValidateGetFramebufferParameteriv(Context *context, 228 GLenum target, 229 GLenum pname, 230 GLint *params); 231 232 bool ValidateGetProgramResourceIndex(Context *context, 233 GLuint program, 234 GLenum programInterface, 235 const GLchar *name); 236 bool ValidateGetProgramResourceName(Context *context, 237 GLuint program, 238 GLenum programInterface, 239 GLuint index, 240 GLsizei bufSize, 241 GLsizei *length, 242 GLchar *name); 243 bool ValidateGetProgramResourceLocation(Context *context, 244 GLuint program, 245 GLenum programInterface, 246 const GLchar *name); 247 248 bool ValidateGetProgramResourceiv(Context *context, 249 GLuint program, 250 GLenum programInterface, 251 GLuint index, 252 GLsizei propCount, 253 const GLenum *props, 254 GLsizei bufSize, 255 GLsizei *length, 256 GLint *params); 257 258 bool ValidateGetProgramInterfaceiv(Context *context, 259 GLuint program, 260 GLenum programInterface, 261 GLenum pname, 262 GLint *params); 263 264 bool ValidateBindVertexBuffer(ValidationContext *context, 265 GLuint bindingIndex, 266 GLuint buffer, 267 GLintptr offset, 268 GLsizei stride); 269 bool ValidateVertexAttribFormat(ValidationContext *context, 270 GLuint attribindex, 271 GLint size, 272 GLenum type, 273 GLboolean normalized, 274 GLuint relativeoffset); 275 bool ValidateVertexAttribIFormat(ValidationContext *context, 276 GLuint attribindex, 277 GLint size, 278 GLenum type, 279 GLuint relativeoffset); 280 bool ValidateVertexAttribBinding(ValidationContext *context, 281 GLuint attribIndex, 282 GLuint bindingIndex); 283 bool ValidateVertexBindingDivisor(ValidationContext *context, GLuint bindingIndex, GLuint divisor); 284 285 bool ValidateDispatchCompute(Context *context, 286 GLuint numGroupsX, 287 GLuint numGroupsY, 288 GLuint numGroupsZ); 289 bool ValidateDispatchComputeIndirect(Context *context, GLintptr indirect); 290 291 bool ValidateBindImageTexture(Context *context, 292 GLuint unit, 293 GLuint texture, 294 GLint level, 295 GLboolean layered, 296 GLint layer, 297 GLenum access, 298 GLenum format); 299 300 bool ValidateGenProgramPipelines(Context *context, GLint n, GLuint *pipelines); 301 bool ValidateDeleteProgramPipelines(Context *context, GLint n, const GLuint *pipelines); 302 bool ValidateBindProgramPipeline(Context *context, GLuint pipeline); 303 bool ValidateIsProgramPipeline(Context *context, GLuint pipeline); 304 bool ValidateUseProgramStages(Context *context, GLuint pipeline, GLbitfield stages, GLuint program); 305 bool ValidateActiveShaderProgram(Context *context, GLuint pipeline, GLuint program); 306 bool ValidateCreateShaderProgramv(Context *context, 307 GLenum type, 308 GLsizei count, 309 const GLchar *const *strings); 310 bool ValidateGetProgramPipelineiv(Context *context, GLuint pipeline, GLenum pname, GLint *params); 311 bool ValidateValidateProgramPipeline(Context *context, GLuint pipeline); 312 bool ValidateGetProgramPipelineInfoLog(Context *context, 313 GLuint pipeline, 314 GLsizei bufSize, 315 GLsizei *length, 316 GLchar *infoLog); 317 318 bool ValidateMemoryBarrier(Context *context, GLbitfield barriers); 319 bool ValidateMemoryBarrierByRegion(Context *context, GLbitfield barriers); 320 321 bool ValidateSampleMaski(Context *context, GLuint maskNumber, GLbitfield mask); 322 323 } // namespace gl 324 325 #endif // LIBANGLE_VALIDATION_ES31_H_ 326