Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 1 | // |
| 2 | // Copyright (c) 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 | |
| 7 | // validationES1.cpp: Validation functions for OpenGL ES 1.0 entry point parameters |
| 8 | |
| 9 | #include "libANGLE/validationES1.h" |
| 10 | |
| 11 | #include "common/debug.h" |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 12 | #include "libANGLE/Context.h" |
| 13 | #include "libANGLE/ErrorStrings.h" |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 14 | #include "libANGLE/GLES1State.h" |
| 15 | #include "libANGLE/queryutils.h" |
Lingfeng Yang | 038dd53 | 2018-03-29 17:31:52 -0700 | [diff] [blame] | 16 | #include "libANGLE/validationES.h" |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 17 | |
| 18 | #define ANGLE_VALIDATE_IS_GLES1(context) \ |
| 19 | if (context->getClientMajorVersion() > 1) \ |
| 20 | { \ |
| 21 | ANGLE_VALIDATION_ERR(context, InvalidOperation(), GLES1Only); \ |
| 22 | return false; \ |
| 23 | } |
| 24 | |
Lingfeng Yang | 0107443 | 2018-04-16 10:19:51 -0700 | [diff] [blame] | 25 | namespace gl |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 26 | { |
| 27 | |
Lingfeng Yang | abb09f1 | 2018-04-16 10:43:53 -0700 | [diff] [blame] | 28 | bool ValidateAlphaFuncCommon(Context *context, AlphaTestFunc func) |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 29 | { |
| 30 | switch (func) |
| 31 | { |
Lingfeng Yang | abb09f1 | 2018-04-16 10:43:53 -0700 | [diff] [blame] | 32 | case AlphaTestFunc::AlwaysPass: |
| 33 | case AlphaTestFunc::Equal: |
| 34 | case AlphaTestFunc::Gequal: |
| 35 | case AlphaTestFunc::Greater: |
| 36 | case AlphaTestFunc::Lequal: |
| 37 | case AlphaTestFunc::Less: |
| 38 | case AlphaTestFunc::Never: |
| 39 | case AlphaTestFunc::NotEqual: |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 40 | return true; |
| 41 | default: |
Lingfeng Yang | 0107443 | 2018-04-16 10:19:51 -0700 | [diff] [blame] | 42 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), EnumNotSupported); |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 43 | return false; |
| 44 | } |
| 45 | } |
| 46 | |
Lingfeng Yang | abb09f1 | 2018-04-16 10:43:53 -0700 | [diff] [blame] | 47 | bool ValidateClientStateCommon(Context *context, ClientVertexArrayType arrayType) |
Lingfeng Yang | 0107443 | 2018-04-16 10:19:51 -0700 | [diff] [blame] | 48 | { |
| 49 | ANGLE_VALIDATE_IS_GLES1(context); |
| 50 | switch (arrayType) |
| 51 | { |
Lingfeng Yang | abb09f1 | 2018-04-16 10:43:53 -0700 | [diff] [blame] | 52 | case ClientVertexArrayType::Vertex: |
| 53 | case ClientVertexArrayType::Normal: |
| 54 | case ClientVertexArrayType::Color: |
| 55 | case ClientVertexArrayType::TextureCoord: |
Lingfeng Yang | 0107443 | 2018-04-16 10:19:51 -0700 | [diff] [blame] | 56 | return true; |
Lingfeng Yang | abb09f1 | 2018-04-16 10:43:53 -0700 | [diff] [blame] | 57 | case ClientVertexArrayType::PointSize: |
Lingfeng Yang | 0107443 | 2018-04-16 10:19:51 -0700 | [diff] [blame] | 58 | if (!context->getExtensions().pointSizeArray) |
| 59 | { |
| 60 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), PointSizeArrayExtensionNotEnabled); |
| 61 | return false; |
| 62 | } |
| 63 | return true; |
| 64 | default: |
| 65 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidClientState); |
| 66 | return false; |
| 67 | } |
| 68 | } |
| 69 | |
Lingfeng Yang | abb09f1 | 2018-04-16 10:43:53 -0700 | [diff] [blame] | 70 | bool ValidateBuiltinVertexAttributeCommon(Context *context, |
| 71 | ClientVertexArrayType arrayType, |
| 72 | GLint size, |
| 73 | GLenum type, |
| 74 | GLsizei stride, |
| 75 | const void *pointer) |
| 76 | { |
| 77 | ANGLE_VALIDATE_IS_GLES1(context); |
| 78 | |
| 79 | if (stride < 0) |
| 80 | { |
| 81 | ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidVertexPointerStride); |
| 82 | return false; |
| 83 | } |
| 84 | |
| 85 | int minSize = 1; |
| 86 | int maxSize = 4; |
| 87 | |
| 88 | switch (arrayType) |
| 89 | { |
| 90 | case ClientVertexArrayType::Vertex: |
| 91 | case ClientVertexArrayType::TextureCoord: |
| 92 | minSize = 2; |
| 93 | maxSize = 4; |
| 94 | break; |
| 95 | case ClientVertexArrayType::Normal: |
| 96 | minSize = 3; |
| 97 | maxSize = 3; |
| 98 | break; |
| 99 | case ClientVertexArrayType::Color: |
| 100 | minSize = 4; |
| 101 | maxSize = 4; |
| 102 | break; |
| 103 | case ClientVertexArrayType::PointSize: |
| 104 | if (!context->getExtensions().pointSizeArray) |
| 105 | { |
| 106 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), PointSizeArrayExtensionNotEnabled); |
| 107 | return false; |
| 108 | } |
| 109 | |
| 110 | minSize = 1; |
| 111 | maxSize = 1; |
| 112 | break; |
| 113 | default: |
| 114 | UNREACHABLE(); |
| 115 | return false; |
| 116 | } |
| 117 | |
| 118 | if (size < minSize || size > maxSize) |
| 119 | { |
| 120 | ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidVertexPointerSize); |
| 121 | return false; |
| 122 | } |
| 123 | |
| 124 | switch (type) |
| 125 | { |
| 126 | case GL_BYTE: |
| 127 | if (arrayType == ClientVertexArrayType::PointSize) |
| 128 | { |
| 129 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidVertexPointerType); |
| 130 | return false; |
| 131 | } |
| 132 | break; |
| 133 | case GL_SHORT: |
| 134 | if (arrayType == ClientVertexArrayType::PointSize || |
| 135 | arrayType == ClientVertexArrayType::Color) |
| 136 | { |
| 137 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidVertexPointerType); |
| 138 | return false; |
| 139 | } |
| 140 | break; |
| 141 | case GL_FIXED: |
| 142 | case GL_FLOAT: |
| 143 | break; |
| 144 | default: |
| 145 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidVertexPointerType); |
| 146 | return false; |
| 147 | } |
| 148 | |
| 149 | return true; |
| 150 | } |
| 151 | |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 152 | bool ValidateLightCaps(Context *context, GLenum light) |
| 153 | { |
| 154 | if (light < GL_LIGHT0 || light >= GL_LIGHT0 + context->getCaps().maxLights) |
| 155 | { |
| 156 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLight); |
| 157 | return false; |
| 158 | } |
| 159 | |
| 160 | return true; |
| 161 | } |
| 162 | |
| 163 | bool ValidateLightCommon(Context *context, |
| 164 | GLenum light, |
| 165 | LightParameter pname, |
| 166 | const GLfloat *params) |
| 167 | { |
| 168 | |
| 169 | ANGLE_VALIDATE_IS_GLES1(context); |
| 170 | |
| 171 | if (!ValidateLightCaps(context, light)) |
| 172 | { |
| 173 | return false; |
| 174 | } |
| 175 | |
| 176 | switch (pname) |
| 177 | { |
| 178 | case LightParameter::Ambient: |
| 179 | case LightParameter::Diffuse: |
| 180 | case LightParameter::Specular: |
| 181 | case LightParameter::Position: |
| 182 | case LightParameter::SpotDirection: |
| 183 | return true; |
| 184 | case LightParameter::SpotExponent: |
| 185 | if (params[0] < 0.0f || params[0] > 128.0f) |
| 186 | { |
| 187 | ANGLE_VALIDATION_ERR(context, InvalidValue(), LightParameterOutOfRange); |
| 188 | return false; |
| 189 | } |
| 190 | return true; |
| 191 | case LightParameter::SpotCutoff: |
| 192 | if (params[0] == 180.0f) |
| 193 | { |
| 194 | return true; |
| 195 | } |
| 196 | if (params[0] < 0.0f || params[0] > 90.0f) |
| 197 | { |
| 198 | ANGLE_VALIDATION_ERR(context, InvalidValue(), LightParameterOutOfRange); |
| 199 | return false; |
| 200 | } |
| 201 | return true; |
| 202 | case LightParameter::ConstantAttenuation: |
| 203 | case LightParameter::LinearAttenuation: |
| 204 | case LightParameter::QuadraticAttenuation: |
| 205 | if (params[0] < 0.0f) |
| 206 | { |
| 207 | ANGLE_VALIDATION_ERR(context, InvalidValue(), LightParameterOutOfRange); |
| 208 | return false; |
| 209 | } |
| 210 | return true; |
| 211 | default: |
| 212 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLightParameter); |
| 213 | return false; |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | bool ValidateLightSingleComponent(Context *context, |
| 218 | GLenum light, |
| 219 | LightParameter pname, |
| 220 | GLfloat param) |
| 221 | { |
| 222 | if (!ValidateLightCommon(context, light, pname, ¶m)) |
| 223 | { |
| 224 | return false; |
| 225 | } |
| 226 | |
| 227 | if (GetLightParameterCount(pname) > 1) |
| 228 | { |
| 229 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLightParameter); |
| 230 | return false; |
| 231 | } |
| 232 | |
| 233 | return true; |
| 234 | } |
| 235 | |
| 236 | bool ValidateMaterialCommon(Context *context, |
| 237 | GLenum face, |
| 238 | MaterialParameter pname, |
| 239 | const GLfloat *params) |
| 240 | { |
| 241 | ANGLE_VALIDATE_IS_GLES1(context); |
| 242 | |
| 243 | if (face != GL_FRONT_AND_BACK) |
| 244 | { |
| 245 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMaterialFace); |
| 246 | return false; |
| 247 | } |
| 248 | |
| 249 | switch (pname) |
| 250 | { |
| 251 | case MaterialParameter::Ambient: |
| 252 | case MaterialParameter::Diffuse: |
| 253 | case MaterialParameter::Specular: |
| 254 | case MaterialParameter::Emission: |
| 255 | return true; |
| 256 | case MaterialParameter::Shininess: |
| 257 | if (params[0] < 0.0f || params[0] > 128.0f) |
| 258 | { |
| 259 | ANGLE_VALIDATION_ERR(context, InvalidValue(), MaterialParameterOutOfRange); |
| 260 | return false; |
| 261 | } |
| 262 | return true; |
| 263 | default: |
| 264 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMaterialParameter); |
| 265 | return false; |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | bool ValidateMaterialSingleComponent(Context *context, |
| 270 | GLenum face, |
| 271 | MaterialParameter pname, |
| 272 | GLfloat param) |
| 273 | { |
| 274 | if (!ValidateMaterialCommon(context, face, pname, ¶m)) |
| 275 | { |
| 276 | return false; |
| 277 | } |
| 278 | |
| 279 | if (GetMaterialParameterCount(pname) > 1) |
| 280 | { |
| 281 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMaterialParameter); |
| 282 | return false; |
| 283 | } |
| 284 | |
| 285 | return true; |
| 286 | } |
| 287 | |
| 288 | bool ValidateLightModelCommon(Context *context, GLenum pname) |
| 289 | { |
| 290 | ANGLE_VALIDATE_IS_GLES1(context); |
| 291 | switch (pname) |
| 292 | { |
| 293 | case GL_LIGHT_MODEL_AMBIENT: |
| 294 | case GL_LIGHT_MODEL_TWO_SIDE: |
| 295 | return true; |
| 296 | default: |
| 297 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLightModelParameter); |
| 298 | return false; |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | bool ValidateLightModelSingleComponent(Context *context, GLenum pname) |
| 303 | { |
| 304 | if (!ValidateLightModelCommon(context, pname)) |
| 305 | { |
| 306 | return false; |
| 307 | } |
| 308 | |
| 309 | switch (pname) |
| 310 | { |
| 311 | case GL_LIGHT_MODEL_TWO_SIDE: |
| 312 | return true; |
| 313 | default: |
| 314 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidLightModelParameter); |
| 315 | return false; |
| 316 | } |
| 317 | } |
| 318 | |
Lingfeng Yang | 060088a | 2018-05-30 20:40:57 -0700 | [diff] [blame] | 319 | bool ValidateClipPlaneCommon(Context *context, GLenum plane) |
| 320 | { |
| 321 | ANGLE_VALIDATE_IS_GLES1(context); |
| 322 | |
| 323 | if (plane < GL_CLIP_PLANE0 || plane >= GL_CLIP_PLANE0 + context->getCaps().maxClipPlanes) |
| 324 | { |
| 325 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidClipPlane); |
| 326 | return false; |
| 327 | } |
| 328 | |
| 329 | return true; |
| 330 | } |
| 331 | |
Lingfeng Yang | 7ba3f42 | 2018-06-01 09:43:04 -0700 | [diff] [blame] | 332 | bool ValidateFogCommon(Context *context, GLenum pname, const GLfloat *params) |
| 333 | { |
| 334 | ANGLE_VALIDATE_IS_GLES1(context); |
| 335 | |
| 336 | switch (pname) |
| 337 | { |
| 338 | case GL_FOG_MODE: |
| 339 | { |
| 340 | GLenum modeParam = static_cast<GLenum>(params[0]); |
| 341 | switch (modeParam) |
| 342 | { |
| 343 | case GL_EXP: |
| 344 | case GL_EXP2: |
| 345 | case GL_LINEAR: |
| 346 | return true; |
| 347 | default: |
| 348 | ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidFogMode); |
| 349 | return false; |
| 350 | } |
| 351 | } |
| 352 | break; |
| 353 | case GL_FOG_START: |
| 354 | case GL_FOG_END: |
| 355 | case GL_FOG_COLOR: |
| 356 | break; |
| 357 | case GL_FOG_DENSITY: |
| 358 | if (params[0] < 0.0f) |
| 359 | { |
| 360 | ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidFogDensity); |
| 361 | return false; |
| 362 | } |
| 363 | break; |
| 364 | default: |
| 365 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidFogParameter); |
| 366 | return false; |
| 367 | } |
| 368 | return true; |
| 369 | } |
| 370 | |
Lingfeng Yang | 0107443 | 2018-04-16 10:19:51 -0700 | [diff] [blame] | 371 | } // namespace gl |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 372 | |
| 373 | namespace gl |
| 374 | { |
| 375 | |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 376 | bool ValidateAlphaFunc(Context *context, AlphaTestFunc func, GLfloat ref) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 377 | { |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 378 | ANGLE_VALIDATE_IS_GLES1(context); |
| 379 | return ValidateAlphaFuncCommon(context, func); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 380 | } |
| 381 | |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 382 | bool ValidateAlphaFuncx(Context *context, AlphaTestFunc func, GLfixed ref) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 383 | { |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 384 | ANGLE_VALIDATE_IS_GLES1(context); |
| 385 | return ValidateAlphaFuncCommon(context, func); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 386 | } |
| 387 | |
| 388 | bool ValidateClearColorx(Context *context, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) |
| 389 | { |
| 390 | UNIMPLEMENTED(); |
| 391 | return true; |
| 392 | } |
| 393 | |
| 394 | bool ValidateClearDepthx(Context *context, GLfixed depth) |
| 395 | { |
| 396 | UNIMPLEMENTED(); |
| 397 | return true; |
| 398 | } |
| 399 | |
| 400 | bool ValidateClientActiveTexture(Context *context, GLenum texture) |
| 401 | { |
Lingfeng Yang | 96310cd | 2018-03-28 11:56:28 -0700 | [diff] [blame] | 402 | ANGLE_VALIDATE_IS_GLES1(context); |
Lingfeng Yang | 038dd53 | 2018-03-29 17:31:52 -0700 | [diff] [blame] | 403 | return ValidateMultitextureUnit(context, texture); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 404 | } |
| 405 | |
Lingfeng Yang | 060088a | 2018-05-30 20:40:57 -0700 | [diff] [blame] | 406 | bool ValidateClipPlanef(Context *context, GLenum plane, const GLfloat *eqn) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 407 | { |
Lingfeng Yang | 060088a | 2018-05-30 20:40:57 -0700 | [diff] [blame] | 408 | return ValidateClipPlaneCommon(context, plane); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 409 | } |
| 410 | |
| 411 | bool ValidateClipPlanex(Context *context, GLenum plane, const GLfixed *equation) |
| 412 | { |
Lingfeng Yang | 060088a | 2018-05-30 20:40:57 -0700 | [diff] [blame] | 413 | return ValidateClipPlaneCommon(context, plane); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 414 | } |
| 415 | |
| 416 | bool ValidateColor4f(Context *context, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) |
| 417 | { |
Lingfeng Yang | a43994c | 2018-03-29 07:21:41 -0700 | [diff] [blame] | 418 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 419 | return true; |
| 420 | } |
| 421 | |
| 422 | bool ValidateColor4ub(Context *context, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) |
| 423 | { |
Lingfeng Yang | a43994c | 2018-03-29 07:21:41 -0700 | [diff] [blame] | 424 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 425 | return true; |
| 426 | } |
| 427 | |
| 428 | bool ValidateColor4x(Context *context, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) |
| 429 | { |
Lingfeng Yang | a43994c | 2018-03-29 07:21:41 -0700 | [diff] [blame] | 430 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 431 | return true; |
| 432 | } |
| 433 | |
| 434 | bool ValidateColorPointer(Context *context, |
| 435 | GLint size, |
| 436 | GLenum type, |
| 437 | GLsizei stride, |
| 438 | const void *pointer) |
| 439 | { |
Lingfeng Yang | abb09f1 | 2018-04-16 10:43:53 -0700 | [diff] [blame] | 440 | return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::Color, size, type, |
| 441 | stride, pointer); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 442 | } |
| 443 | |
| 444 | bool ValidateCullFace(Context *context, GLenum mode) |
| 445 | { |
| 446 | UNIMPLEMENTED(); |
| 447 | return true; |
| 448 | } |
| 449 | |
| 450 | bool ValidateDepthRangex(Context *context, GLfixed n, GLfixed f) |
| 451 | { |
| 452 | UNIMPLEMENTED(); |
| 453 | return true; |
| 454 | } |
| 455 | |
Lingfeng Yang | 0107443 | 2018-04-16 10:19:51 -0700 | [diff] [blame] | 456 | bool ValidateDisableClientState(Context *context, ClientVertexArrayType arrayType) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 457 | { |
Lingfeng Yang | 0107443 | 2018-04-16 10:19:51 -0700 | [diff] [blame] | 458 | return ValidateClientStateCommon(context, arrayType); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 459 | } |
| 460 | |
Lingfeng Yang | 0107443 | 2018-04-16 10:19:51 -0700 | [diff] [blame] | 461 | bool ValidateEnableClientState(Context *context, ClientVertexArrayType arrayType) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 462 | { |
Lingfeng Yang | 0107443 | 2018-04-16 10:19:51 -0700 | [diff] [blame] | 463 | return ValidateClientStateCommon(context, arrayType); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 464 | } |
| 465 | |
| 466 | bool ValidateFogf(Context *context, GLenum pname, GLfloat param) |
| 467 | { |
Lingfeng Yang | 7ba3f42 | 2018-06-01 09:43:04 -0700 | [diff] [blame] | 468 | return ValidateFogCommon(context, pname, ¶m); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 469 | } |
| 470 | |
| 471 | bool ValidateFogfv(Context *context, GLenum pname, const GLfloat *params) |
| 472 | { |
Lingfeng Yang | 7ba3f42 | 2018-06-01 09:43:04 -0700 | [diff] [blame] | 473 | return ValidateFogCommon(context, pname, params); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 474 | } |
| 475 | |
| 476 | bool ValidateFogx(Context *context, GLenum pname, GLfixed param) |
| 477 | { |
Lingfeng Yang | 7ba3f42 | 2018-06-01 09:43:04 -0700 | [diff] [blame] | 478 | GLfloat asFloat = FixedToFloat(param); |
| 479 | return ValidateFogCommon(context, pname, &asFloat); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 480 | } |
| 481 | |
Lingfeng Yang | 7ba3f42 | 2018-06-01 09:43:04 -0700 | [diff] [blame] | 482 | bool ValidateFogxv(Context *context, GLenum pname, const GLfixed *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 483 | { |
Lingfeng Yang | 7ba3f42 | 2018-06-01 09:43:04 -0700 | [diff] [blame] | 484 | unsigned int paramCount = GetFogParameterCount(pname); |
| 485 | GLfloat paramsf[4] = {}; |
| 486 | |
| 487 | for (unsigned int i = 0; i < paramCount; i++) |
| 488 | { |
| 489 | paramsf[i] = FixedToFloat(params[i]); |
| 490 | } |
| 491 | |
| 492 | return ValidateFogCommon(context, pname, paramsf); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 493 | } |
| 494 | |
| 495 | bool ValidateFrustumf(Context *context, |
| 496 | GLfloat l, |
| 497 | GLfloat r, |
| 498 | GLfloat b, |
| 499 | GLfloat t, |
| 500 | GLfloat n, |
| 501 | GLfloat f) |
| 502 | { |
Lingfeng Yang | bb5ce5c | 2018-04-09 08:08:46 -0700 | [diff] [blame] | 503 | ANGLE_VALIDATE_IS_GLES1(context); |
| 504 | if (l == r || b == t || n == f || n <= 0.0f || f <= 0.0f) |
| 505 | { |
| 506 | ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix); |
| 507 | } |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 508 | return true; |
| 509 | } |
| 510 | |
| 511 | bool ValidateFrustumx(Context *context, |
| 512 | GLfixed l, |
| 513 | GLfixed r, |
| 514 | GLfixed b, |
| 515 | GLfixed t, |
| 516 | GLfixed n, |
| 517 | GLfixed f) |
| 518 | { |
Lingfeng Yang | bb5ce5c | 2018-04-09 08:08:46 -0700 | [diff] [blame] | 519 | ANGLE_VALIDATE_IS_GLES1(context); |
| 520 | if (l == r || b == t || n == f || n <= 0 || f <= 0) |
| 521 | { |
| 522 | ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix); |
| 523 | } |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 524 | return true; |
| 525 | } |
| 526 | |
| 527 | bool ValidateGetBufferParameteriv(Context *context, GLenum target, GLenum pname, GLint *params) |
| 528 | { |
| 529 | UNIMPLEMENTED(); |
| 530 | return true; |
| 531 | } |
| 532 | |
| 533 | bool ValidateGetClipPlanef(Context *context, GLenum plane, GLfloat *equation) |
| 534 | { |
Lingfeng Yang | 060088a | 2018-05-30 20:40:57 -0700 | [diff] [blame] | 535 | return ValidateClipPlaneCommon(context, plane); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 536 | } |
| 537 | |
| 538 | bool ValidateGetClipPlanex(Context *context, GLenum plane, GLfixed *equation) |
| 539 | { |
Lingfeng Yang | 060088a | 2018-05-30 20:40:57 -0700 | [diff] [blame] | 540 | return ValidateClipPlaneCommon(context, plane); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 541 | } |
| 542 | |
| 543 | bool ValidateGetFixedv(Context *context, GLenum pname, GLfixed *params) |
| 544 | { |
| 545 | UNIMPLEMENTED(); |
| 546 | return true; |
| 547 | } |
| 548 | |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 549 | bool ValidateGetLightfv(Context *context, GLenum light, LightParameter pname, GLfloat *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 550 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 551 | GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f}; |
| 552 | return ValidateLightCommon(context, light, pname, dummyParams); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 553 | } |
| 554 | |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 555 | bool ValidateGetLightxv(Context *context, GLenum light, LightParameter pname, GLfixed *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 556 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 557 | GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f}; |
| 558 | return ValidateLightCommon(context, light, pname, dummyParams); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 559 | } |
| 560 | |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 561 | bool ValidateGetMaterialfv(Context *context, GLenum face, MaterialParameter pname, GLfloat *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 562 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 563 | GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f}; |
| 564 | return ValidateMaterialCommon(context, face, pname, dummyParams); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 565 | } |
| 566 | |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 567 | bool ValidateGetMaterialxv(Context *context, GLenum face, MaterialParameter pname, GLfixed *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 568 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 569 | GLfloat dummyParams[4] = {0.0f, 0.0f, 0.0f, 0.0f}; |
| 570 | return ValidateMaterialCommon(context, face, pname, dummyParams); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 571 | } |
| 572 | |
| 573 | bool ValidateGetPointerv(Context *context, GLenum pname, void **params) |
| 574 | { |
Lingfeng Yang | abb09f1 | 2018-04-16 10:43:53 -0700 | [diff] [blame] | 575 | ANGLE_VALIDATE_IS_GLES1(context); |
| 576 | switch (pname) |
| 577 | { |
| 578 | case GL_VERTEX_ARRAY_POINTER: |
| 579 | case GL_NORMAL_ARRAY_POINTER: |
| 580 | case GL_COLOR_ARRAY_POINTER: |
| 581 | case GL_TEXTURE_COORD_ARRAY_POINTER: |
| 582 | case GL_POINT_SIZE_ARRAY_POINTER_OES: |
| 583 | return true; |
| 584 | default: |
| 585 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidPointerQuery); |
| 586 | return false; |
| 587 | } |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 588 | } |
| 589 | |
Lingfeng Yang | 74be296 | 2018-06-07 09:13:38 -0700 | [diff] [blame] | 590 | bool ValidateGetTexEnvfv(Context *context, |
| 591 | TextureEnvTarget target, |
| 592 | TextureEnvParameter pname, |
| 593 | GLfloat *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 594 | { |
| 595 | UNIMPLEMENTED(); |
| 596 | return true; |
| 597 | } |
| 598 | |
Lingfeng Yang | 74be296 | 2018-06-07 09:13:38 -0700 | [diff] [blame] | 599 | bool ValidateGetTexEnviv(Context *context, |
| 600 | TextureEnvTarget target, |
| 601 | TextureEnvParameter pname, |
| 602 | GLint *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 603 | { |
| 604 | UNIMPLEMENTED(); |
| 605 | return true; |
| 606 | } |
| 607 | |
Lingfeng Yang | 74be296 | 2018-06-07 09:13:38 -0700 | [diff] [blame] | 608 | bool ValidateGetTexEnvxv(Context *context, |
| 609 | TextureEnvTarget target, |
| 610 | TextureEnvParameter pname, |
| 611 | GLfixed *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 612 | { |
| 613 | UNIMPLEMENTED(); |
| 614 | return true; |
| 615 | } |
| 616 | |
Corentin Wallez | f0e89be | 2017-11-08 14:00:32 -0800 | [diff] [blame] | 617 | bool ValidateGetTexParameterxv(Context *context, TextureType target, GLenum pname, GLfixed *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 618 | { |
| 619 | UNIMPLEMENTED(); |
| 620 | return true; |
| 621 | } |
| 622 | |
| 623 | bool ValidateLightModelf(Context *context, GLenum pname, GLfloat param) |
| 624 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 625 | return ValidateLightModelSingleComponent(context, pname); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 626 | } |
| 627 | |
| 628 | bool ValidateLightModelfv(Context *context, GLenum pname, const GLfloat *params) |
| 629 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 630 | return ValidateLightModelCommon(context, pname); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 631 | } |
| 632 | |
| 633 | bool ValidateLightModelx(Context *context, GLenum pname, GLfixed param) |
| 634 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 635 | return ValidateLightModelSingleComponent(context, pname); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 636 | } |
| 637 | |
| 638 | bool ValidateLightModelxv(Context *context, GLenum pname, const GLfixed *param) |
| 639 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 640 | return ValidateLightModelCommon(context, pname); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 641 | } |
| 642 | |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 643 | bool ValidateLightf(Context *context, GLenum light, LightParameter pname, GLfloat param) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 644 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 645 | return ValidateLightSingleComponent(context, light, pname, param); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 646 | } |
| 647 | |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 648 | bool ValidateLightfv(Context *context, GLenum light, LightParameter pname, const GLfloat *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 649 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 650 | return ValidateLightCommon(context, light, pname, params); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 651 | } |
| 652 | |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 653 | bool ValidateLightx(Context *context, GLenum light, LightParameter pname, GLfixed param) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 654 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 655 | return ValidateLightSingleComponent(context, light, pname, FixedToFloat(param)); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 656 | } |
| 657 | |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 658 | bool ValidateLightxv(Context *context, GLenum light, LightParameter pname, const GLfixed *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 659 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 660 | GLfloat paramsf[4]; |
| 661 | for (unsigned int i = 0; i < GetLightParameterCount(pname); i++) |
| 662 | { |
| 663 | paramsf[i] = FixedToFloat(params[i]); |
| 664 | } |
| 665 | |
| 666 | return ValidateLightCommon(context, light, pname, paramsf); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 667 | } |
| 668 | |
| 669 | bool ValidateLineWidthx(Context *context, GLfixed width) |
| 670 | { |
| 671 | UNIMPLEMENTED(); |
| 672 | return true; |
| 673 | } |
| 674 | |
| 675 | bool ValidateLoadIdentity(Context *context) |
| 676 | { |
Lingfeng Yang | 3a41af6 | 2018-04-09 07:28:56 -0700 | [diff] [blame] | 677 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 678 | return true; |
| 679 | } |
| 680 | |
| 681 | bool ValidateLoadMatrixf(Context *context, const GLfloat *m) |
| 682 | { |
Lingfeng Yang | 3a41af6 | 2018-04-09 07:28:56 -0700 | [diff] [blame] | 683 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 684 | return true; |
| 685 | } |
| 686 | |
| 687 | bool ValidateLoadMatrixx(Context *context, const GLfixed *m) |
| 688 | { |
Lingfeng Yang | 3a41af6 | 2018-04-09 07:28:56 -0700 | [diff] [blame] | 689 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 690 | return true; |
| 691 | } |
| 692 | |
| 693 | bool ValidateLogicOp(Context *context, GLenum opcode) |
| 694 | { |
| 695 | UNIMPLEMENTED(); |
| 696 | return true; |
| 697 | } |
| 698 | |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 699 | bool ValidateMaterialf(Context *context, GLenum face, MaterialParameter pname, GLfloat param) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 700 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 701 | return ValidateMaterialSingleComponent(context, face, pname, param); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 702 | } |
| 703 | |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 704 | bool ValidateMaterialfv(Context *context, |
| 705 | GLenum face, |
| 706 | MaterialParameter pname, |
| 707 | const GLfloat *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 708 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 709 | return ValidateMaterialCommon(context, face, pname, params); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 710 | } |
| 711 | |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 712 | bool ValidateMaterialx(Context *context, GLenum face, MaterialParameter pname, GLfixed param) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 713 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 714 | return ValidateMaterialSingleComponent(context, face, pname, FixedToFloat(param)); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 715 | } |
| 716 | |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 717 | bool ValidateMaterialxv(Context *context, |
| 718 | GLenum face, |
| 719 | MaterialParameter pname, |
| 720 | const GLfixed *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 721 | { |
Lingfeng Yang | d0febe7 | 2018-05-17 22:36:52 -0700 | [diff] [blame] | 722 | GLfloat paramsf[4]; |
| 723 | |
| 724 | for (unsigned int i = 0; i < GetMaterialParameterCount(pname); i++) |
| 725 | { |
| 726 | paramsf[i] = FixedToFloat(params[i]); |
| 727 | } |
| 728 | |
| 729 | return ValidateMaterialCommon(context, face, pname, paramsf); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 730 | } |
| 731 | |
Lingfeng Yang | 00af463 | 2018-04-02 12:42:24 -0700 | [diff] [blame] | 732 | bool ValidateMatrixMode(Context *context, MatrixType mode) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 733 | { |
Lingfeng Yang | d2488ab | 2018-04-04 09:25:48 -0700 | [diff] [blame] | 734 | ANGLE_VALIDATE_IS_GLES1(context); |
| 735 | switch (mode) |
| 736 | { |
| 737 | case MatrixType::Projection: |
| 738 | case MatrixType::Modelview: |
| 739 | case MatrixType::Texture: |
| 740 | return true; |
| 741 | default: |
| 742 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMatrixMode); |
| 743 | return false; |
| 744 | } |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 745 | } |
| 746 | |
| 747 | bool ValidateMultMatrixf(Context *context, const GLfloat *m) |
| 748 | { |
Lingfeng Yang | 568fc39 | 2018-04-09 07:57:23 -0700 | [diff] [blame] | 749 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 750 | return true; |
| 751 | } |
| 752 | |
| 753 | bool ValidateMultMatrixx(Context *context, const GLfixed *m) |
| 754 | { |
Lingfeng Yang | 568fc39 | 2018-04-09 07:57:23 -0700 | [diff] [blame] | 755 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 756 | return true; |
| 757 | } |
| 758 | |
| 759 | bool ValidateMultiTexCoord4f(Context *context, |
| 760 | GLenum target, |
| 761 | GLfloat s, |
| 762 | GLfloat t, |
| 763 | GLfloat r, |
| 764 | GLfloat q) |
| 765 | { |
Lingfeng Yang | 038dd53 | 2018-03-29 17:31:52 -0700 | [diff] [blame] | 766 | ANGLE_VALIDATE_IS_GLES1(context); |
| 767 | return ValidateMultitextureUnit(context, target); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 768 | } |
| 769 | |
| 770 | bool ValidateMultiTexCoord4x(Context *context, |
Lingfeng Yang | 038dd53 | 2018-03-29 17:31:52 -0700 | [diff] [blame] | 771 | GLenum target, |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 772 | GLfixed s, |
| 773 | GLfixed t, |
| 774 | GLfixed r, |
| 775 | GLfixed q) |
| 776 | { |
Lingfeng Yang | 038dd53 | 2018-03-29 17:31:52 -0700 | [diff] [blame] | 777 | ANGLE_VALIDATE_IS_GLES1(context); |
| 778 | return ValidateMultitextureUnit(context, target); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 779 | } |
| 780 | |
| 781 | bool ValidateNormal3f(Context *context, GLfloat nx, GLfloat ny, GLfloat nz) |
| 782 | { |
Lingfeng Yang | 5a7e61b | 2018-03-29 16:50:32 -0700 | [diff] [blame] | 783 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 784 | return true; |
| 785 | } |
| 786 | |
| 787 | bool ValidateNormal3x(Context *context, GLfixed nx, GLfixed ny, GLfixed nz) |
| 788 | { |
Lingfeng Yang | 5a7e61b | 2018-03-29 16:50:32 -0700 | [diff] [blame] | 789 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 790 | return true; |
| 791 | } |
| 792 | |
| 793 | bool ValidateNormalPointer(Context *context, GLenum type, GLsizei stride, const void *pointer) |
| 794 | { |
Lingfeng Yang | abb09f1 | 2018-04-16 10:43:53 -0700 | [diff] [blame] | 795 | return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::Normal, 3, type, |
| 796 | stride, pointer); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 797 | } |
| 798 | |
| 799 | bool ValidateOrthof(Context *context, |
| 800 | GLfloat l, |
| 801 | GLfloat r, |
| 802 | GLfloat b, |
| 803 | GLfloat t, |
| 804 | GLfloat n, |
| 805 | GLfloat f) |
| 806 | { |
Lingfeng Yang | bb5ce5c | 2018-04-09 08:08:46 -0700 | [diff] [blame] | 807 | ANGLE_VALIDATE_IS_GLES1(context); |
| 808 | if (l == r || b == t || n == f || n <= 0.0f || f <= 0.0f) |
| 809 | { |
| 810 | ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix); |
| 811 | } |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 812 | return true; |
| 813 | } |
| 814 | |
| 815 | bool ValidateOrthox(Context *context, |
| 816 | GLfixed l, |
| 817 | GLfixed r, |
| 818 | GLfixed b, |
| 819 | GLfixed t, |
| 820 | GLfixed n, |
| 821 | GLfixed f) |
| 822 | { |
Lingfeng Yang | bb5ce5c | 2018-04-09 08:08:46 -0700 | [diff] [blame] | 823 | ANGLE_VALIDATE_IS_GLES1(context); |
| 824 | if (l == r || b == t || n == f || n <= 0 || f <= 0) |
| 825 | { |
| 826 | ANGLE_VALIDATION_ERR(context, InvalidValue(), InvalidProjectionMatrix); |
| 827 | } |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 828 | return true; |
| 829 | } |
| 830 | |
| 831 | bool ValidatePointParameterf(Context *context, GLenum pname, GLfloat param) |
| 832 | { |
| 833 | UNIMPLEMENTED(); |
| 834 | return true; |
| 835 | } |
| 836 | |
| 837 | bool ValidatePointParameterfv(Context *context, GLenum pname, const GLfloat *params) |
| 838 | { |
| 839 | UNIMPLEMENTED(); |
| 840 | return true; |
| 841 | } |
| 842 | |
| 843 | bool ValidatePointParameterx(Context *context, GLenum pname, GLfixed param) |
| 844 | { |
| 845 | UNIMPLEMENTED(); |
| 846 | return true; |
| 847 | } |
| 848 | |
| 849 | bool ValidatePointParameterxv(Context *context, GLenum pname, const GLfixed *params) |
| 850 | { |
| 851 | UNIMPLEMENTED(); |
| 852 | return true; |
| 853 | } |
| 854 | |
| 855 | bool ValidatePointSize(Context *context, GLfloat size) |
| 856 | { |
| 857 | UNIMPLEMENTED(); |
| 858 | return true; |
| 859 | } |
| 860 | |
| 861 | bool ValidatePointSizex(Context *context, GLfixed size) |
| 862 | { |
| 863 | UNIMPLEMENTED(); |
| 864 | return true; |
| 865 | } |
| 866 | |
| 867 | bool ValidatePolygonOffsetx(Context *context, GLfixed factor, GLfixed units) |
| 868 | { |
| 869 | UNIMPLEMENTED(); |
| 870 | return true; |
| 871 | } |
| 872 | |
| 873 | bool ValidatePopMatrix(Context *context) |
| 874 | { |
Lingfeng Yang | e547aac | 2018-04-05 09:39:20 -0700 | [diff] [blame] | 875 | ANGLE_VALIDATE_IS_GLES1(context); |
| 876 | const auto &stack = context->getGLState().gles1().currentMatrixStack(); |
| 877 | if (stack.size() == 1) |
| 878 | { |
| 879 | ANGLE_VALIDATION_ERR(context, StackUnderflow(), MatrixStackUnderflow); |
| 880 | return false; |
| 881 | } |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 882 | return true; |
| 883 | } |
| 884 | |
| 885 | bool ValidatePushMatrix(Context *context) |
| 886 | { |
Lingfeng Yang | e547aac | 2018-04-05 09:39:20 -0700 | [diff] [blame] | 887 | ANGLE_VALIDATE_IS_GLES1(context); |
| 888 | const auto &stack = context->getGLState().gles1().currentMatrixStack(); |
| 889 | if (stack.size() == stack.max_size()) |
| 890 | { |
| 891 | ANGLE_VALIDATION_ERR(context, StackOverflow(), MatrixStackOverflow); |
| 892 | return false; |
| 893 | } |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 894 | return true; |
| 895 | } |
| 896 | |
| 897 | bool ValidateRotatef(Context *context, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) |
| 898 | { |
Lingfeng Yang | bb5ce5c | 2018-04-09 08:08:46 -0700 | [diff] [blame] | 899 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 900 | return true; |
| 901 | } |
| 902 | |
| 903 | bool ValidateRotatex(Context *context, GLfixed angle, GLfixed x, GLfixed y, GLfixed z) |
| 904 | { |
Lingfeng Yang | bb5ce5c | 2018-04-09 08:08:46 -0700 | [diff] [blame] | 905 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 906 | return true; |
| 907 | } |
| 908 | |
| 909 | bool ValidateSampleCoveragex(Context *context, GLclampx value, GLboolean invert) |
| 910 | { |
| 911 | UNIMPLEMENTED(); |
| 912 | return true; |
| 913 | } |
| 914 | |
| 915 | bool ValidateScalef(Context *context, GLfloat x, GLfloat y, GLfloat z) |
| 916 | { |
Lingfeng Yang | bb5ce5c | 2018-04-09 08:08:46 -0700 | [diff] [blame] | 917 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 918 | return true; |
| 919 | } |
| 920 | |
| 921 | bool ValidateScalex(Context *context, GLfixed x, GLfixed y, GLfixed z) |
| 922 | { |
Lingfeng Yang | bb5ce5c | 2018-04-09 08:08:46 -0700 | [diff] [blame] | 923 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 924 | return true; |
| 925 | } |
| 926 | |
Lingfeng Yang | a0cfa87 | 2018-05-30 21:12:17 -0700 | [diff] [blame] | 927 | bool ValidateShadeModel(Context *context, ShadingModel mode) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 928 | { |
Lingfeng Yang | a0cfa87 | 2018-05-30 21:12:17 -0700 | [diff] [blame] | 929 | ANGLE_VALIDATE_IS_GLES1(context); |
| 930 | switch (mode) |
| 931 | { |
| 932 | case ShadingModel::Flat: |
| 933 | case ShadingModel::Smooth: |
| 934 | return true; |
| 935 | default: |
| 936 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidShadingModel); |
| 937 | return false; |
| 938 | } |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 939 | } |
| 940 | |
| 941 | bool ValidateTexCoordPointer(Context *context, |
| 942 | GLint size, |
| 943 | GLenum type, |
| 944 | GLsizei stride, |
| 945 | const void *pointer) |
| 946 | { |
Lingfeng Yang | abb09f1 | 2018-04-16 10:43:53 -0700 | [diff] [blame] | 947 | return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::TextureCoord, size, |
| 948 | type, stride, pointer); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 949 | } |
| 950 | |
Lingfeng Yang | 74be296 | 2018-06-07 09:13:38 -0700 | [diff] [blame] | 951 | bool ValidateTexEnvf(Context *context, |
| 952 | TextureEnvTarget target, |
| 953 | TextureEnvParameter pname, |
| 954 | GLfloat param) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 955 | { |
| 956 | UNIMPLEMENTED(); |
| 957 | return true; |
| 958 | } |
| 959 | |
Lingfeng Yang | 74be296 | 2018-06-07 09:13:38 -0700 | [diff] [blame] | 960 | bool ValidateTexEnvfv(Context *context, |
| 961 | TextureEnvTarget target, |
| 962 | TextureEnvParameter pname, |
| 963 | const GLfloat *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 964 | { |
| 965 | UNIMPLEMENTED(); |
| 966 | return true; |
| 967 | } |
| 968 | |
Lingfeng Yang | 74be296 | 2018-06-07 09:13:38 -0700 | [diff] [blame] | 969 | bool ValidateTexEnvi(Context *context, |
| 970 | TextureEnvTarget target, |
| 971 | TextureEnvParameter pname, |
| 972 | GLint param) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 973 | { |
| 974 | UNIMPLEMENTED(); |
| 975 | return true; |
| 976 | } |
| 977 | |
Lingfeng Yang | 74be296 | 2018-06-07 09:13:38 -0700 | [diff] [blame] | 978 | bool ValidateTexEnviv(Context *context, |
| 979 | TextureEnvTarget target, |
| 980 | TextureEnvParameter pname, |
| 981 | const GLint *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 982 | { |
| 983 | UNIMPLEMENTED(); |
| 984 | return true; |
| 985 | } |
| 986 | |
Lingfeng Yang | 74be296 | 2018-06-07 09:13:38 -0700 | [diff] [blame] | 987 | bool ValidateTexEnvx(Context *context, |
| 988 | TextureEnvTarget target, |
| 989 | TextureEnvParameter pname, |
| 990 | GLfixed param) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 991 | { |
| 992 | UNIMPLEMENTED(); |
| 993 | return true; |
| 994 | } |
| 995 | |
Lingfeng Yang | 74be296 | 2018-06-07 09:13:38 -0700 | [diff] [blame] | 996 | bool ValidateTexEnvxv(Context *context, |
| 997 | TextureEnvTarget target, |
| 998 | TextureEnvParameter pname, |
| 999 | const GLfixed *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 1000 | { |
| 1001 | UNIMPLEMENTED(); |
| 1002 | return true; |
| 1003 | } |
| 1004 | |
Corentin Wallez | f0e89be | 2017-11-08 14:00:32 -0800 | [diff] [blame] | 1005 | bool ValidateTexParameterx(Context *context, TextureType target, GLenum pname, GLfixed param) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 1006 | { |
| 1007 | UNIMPLEMENTED(); |
| 1008 | return true; |
| 1009 | } |
| 1010 | |
Corentin Wallez | f0e89be | 2017-11-08 14:00:32 -0800 | [diff] [blame] | 1011 | bool ValidateTexParameterxv(Context *context, |
| 1012 | TextureType target, |
| 1013 | GLenum pname, |
| 1014 | const GLfixed *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 1015 | { |
| 1016 | UNIMPLEMENTED(); |
| 1017 | return true; |
| 1018 | } |
| 1019 | |
| 1020 | bool ValidateTranslatef(Context *context, GLfloat x, GLfloat y, GLfloat z) |
| 1021 | { |
Lingfeng Yang | bb5ce5c | 2018-04-09 08:08:46 -0700 | [diff] [blame] | 1022 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 1023 | return true; |
| 1024 | } |
| 1025 | |
| 1026 | bool ValidateTranslatex(Context *context, GLfixed x, GLfixed y, GLfixed z) |
| 1027 | { |
Lingfeng Yang | bb5ce5c | 2018-04-09 08:08:46 -0700 | [diff] [blame] | 1028 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 1029 | return true; |
| 1030 | } |
| 1031 | |
| 1032 | bool ValidateVertexPointer(Context *context, |
| 1033 | GLint size, |
| 1034 | GLenum type, |
| 1035 | GLsizei stride, |
| 1036 | const void *pointer) |
| 1037 | { |
Lingfeng Yang | abb09f1 | 2018-04-16 10:43:53 -0700 | [diff] [blame] | 1038 | return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::Vertex, size, type, |
| 1039 | stride, pointer); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 1040 | } |
| 1041 | |
| 1042 | bool ValidateDrawTexfOES(Context *context, |
| 1043 | GLfloat x, |
| 1044 | GLfloat y, |
| 1045 | GLfloat z, |
| 1046 | GLfloat width, |
| 1047 | GLfloat height) |
| 1048 | { |
| 1049 | UNIMPLEMENTED(); |
| 1050 | return true; |
| 1051 | } |
| 1052 | |
| 1053 | bool ValidateDrawTexfvOES(Context *context, const GLfloat *coords) |
| 1054 | { |
| 1055 | UNIMPLEMENTED(); |
| 1056 | return true; |
| 1057 | } |
| 1058 | |
| 1059 | bool ValidateDrawTexiOES(Context *context, GLint x, GLint y, GLint z, GLint width, GLint height) |
| 1060 | { |
| 1061 | UNIMPLEMENTED(); |
| 1062 | return true; |
| 1063 | } |
| 1064 | |
| 1065 | bool ValidateDrawTexivOES(Context *context, const GLint *coords) |
| 1066 | { |
| 1067 | UNIMPLEMENTED(); |
| 1068 | return true; |
| 1069 | } |
| 1070 | |
| 1071 | bool ValidateDrawTexsOES(Context *context, |
| 1072 | GLshort x, |
| 1073 | GLshort y, |
| 1074 | GLshort z, |
| 1075 | GLshort width, |
| 1076 | GLshort height) |
| 1077 | { |
| 1078 | UNIMPLEMENTED(); |
| 1079 | return true; |
| 1080 | } |
| 1081 | |
| 1082 | bool ValidateDrawTexsvOES(Context *context, const GLshort *coords) |
| 1083 | { |
| 1084 | UNIMPLEMENTED(); |
| 1085 | return true; |
| 1086 | } |
| 1087 | |
| 1088 | bool ValidateDrawTexxOES(Context *context, |
| 1089 | GLfixed x, |
| 1090 | GLfixed y, |
| 1091 | GLfixed z, |
| 1092 | GLfixed width, |
| 1093 | GLfixed height) |
| 1094 | { |
| 1095 | UNIMPLEMENTED(); |
| 1096 | return true; |
| 1097 | } |
| 1098 | |
| 1099 | bool ValidateDrawTexxvOES(Context *context, const GLfixed *coords) |
| 1100 | { |
| 1101 | UNIMPLEMENTED(); |
| 1102 | return true; |
| 1103 | } |
| 1104 | |
| 1105 | bool ValidateCurrentPaletteMatrixOES(Context *context, GLuint matrixpaletteindex) |
| 1106 | { |
| 1107 | UNIMPLEMENTED(); |
| 1108 | return true; |
| 1109 | } |
| 1110 | |
| 1111 | bool ValidateLoadPaletteFromModelViewMatrixOES(Context *context) |
| 1112 | { |
| 1113 | UNIMPLEMENTED(); |
| 1114 | return true; |
| 1115 | } |
| 1116 | |
| 1117 | bool ValidateMatrixIndexPointerOES(Context *context, |
| 1118 | GLint size, |
| 1119 | GLenum type, |
| 1120 | GLsizei stride, |
| 1121 | const void *pointer) |
| 1122 | { |
| 1123 | UNIMPLEMENTED(); |
| 1124 | return true; |
| 1125 | } |
| 1126 | |
| 1127 | bool ValidateWeightPointerOES(Context *context, |
| 1128 | GLint size, |
| 1129 | GLenum type, |
| 1130 | GLsizei stride, |
| 1131 | const void *pointer) |
| 1132 | { |
| 1133 | UNIMPLEMENTED(); |
| 1134 | return true; |
| 1135 | } |
| 1136 | |
| 1137 | bool ValidatePointSizePointerOES(Context *context, GLenum type, GLsizei stride, const void *pointer) |
| 1138 | { |
Lingfeng Yang | abb09f1 | 2018-04-16 10:43:53 -0700 | [diff] [blame] | 1139 | return ValidateBuiltinVertexAttributeCommon(context, ClientVertexArrayType::PointSize, 1, type, |
| 1140 | stride, pointer); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 1141 | } |
| 1142 | |
| 1143 | bool ValidateQueryMatrixxOES(Context *context, GLfixed *mantissa, GLint *exponent) |
| 1144 | { |
| 1145 | UNIMPLEMENTED(); |
| 1146 | return true; |
| 1147 | } |
Lingfeng Yang | a064878 | 2018-03-12 14:45:25 -0700 | [diff] [blame] | 1148 | |
| 1149 | bool ValidateGenFramebuffersOES(Context *context, GLsizei n, GLuint *framebuffers) |
| 1150 | { |
| 1151 | UNIMPLEMENTED(); |
| 1152 | return true; |
| 1153 | } |
| 1154 | |
| 1155 | bool ValidateDeleteFramebuffersOES(Context *context, GLsizei n, const GLuint *framebuffers) |
| 1156 | { |
| 1157 | UNIMPLEMENTED(); |
| 1158 | return true; |
| 1159 | } |
| 1160 | |
| 1161 | bool ValidateGenRenderbuffersOES(Context *context, GLsizei n, GLuint *renderbuffers) |
| 1162 | { |
| 1163 | UNIMPLEMENTED(); |
| 1164 | return true; |
| 1165 | } |
| 1166 | |
| 1167 | bool ValidateDeleteRenderbuffersOES(Context *context, GLsizei n, const GLuint *renderbuffers) |
| 1168 | { |
| 1169 | UNIMPLEMENTED(); |
| 1170 | return true; |
| 1171 | } |
| 1172 | |
| 1173 | bool ValidateBindFramebufferOES(Context *context, GLenum target, GLuint framebuffer) |
| 1174 | { |
| 1175 | UNIMPLEMENTED(); |
| 1176 | return true; |
| 1177 | } |
| 1178 | |
| 1179 | bool ValidateBindRenderbufferOES(Context *context, GLenum target, GLuint renderbuffer) |
| 1180 | { |
| 1181 | UNIMPLEMENTED(); |
| 1182 | return true; |
| 1183 | } |
| 1184 | |
| 1185 | bool ValidateCheckFramebufferStatusOES(Context *context, GLenum target) |
| 1186 | { |
| 1187 | UNIMPLEMENTED(); |
| 1188 | return true; |
| 1189 | } |
| 1190 | |
| 1191 | bool ValidateFramebufferRenderbufferOES(Context *context, |
| 1192 | GLenum target, |
| 1193 | GLenum attachment, |
| 1194 | GLenum rbtarget, |
| 1195 | GLuint renderbuffer) |
| 1196 | { |
| 1197 | UNIMPLEMENTED(); |
| 1198 | return true; |
| 1199 | } |
| 1200 | |
| 1201 | bool ValidateFramebufferTexture2DOES(Context *context, |
| 1202 | GLenum target, |
| 1203 | GLenum attachment, |
| 1204 | TextureTarget textarget, |
| 1205 | GLuint texture, |
| 1206 | GLint level) |
| 1207 | { |
| 1208 | UNIMPLEMENTED(); |
| 1209 | return true; |
| 1210 | } |
| 1211 | |
| 1212 | bool ValidateGenerateMipmapOES(Context *context, TextureType target) |
| 1213 | { |
| 1214 | UNIMPLEMENTED(); |
| 1215 | return true; |
| 1216 | } |
| 1217 | |
| 1218 | bool ValidateGetFramebufferAttachmentParameterivOES(Context *context, |
| 1219 | GLenum target, |
| 1220 | GLenum attachment, |
| 1221 | GLenum pname, |
| 1222 | GLint *params) |
| 1223 | { |
| 1224 | UNIMPLEMENTED(); |
| 1225 | return true; |
| 1226 | } |
| 1227 | |
| 1228 | bool ValidateGetRenderbufferParameterivOES(Context *context, |
| 1229 | GLenum target, |
| 1230 | GLenum pname, |
| 1231 | GLint *params) |
| 1232 | { |
| 1233 | UNIMPLEMENTED(); |
| 1234 | return true; |
| 1235 | } |
| 1236 | |
| 1237 | bool ValidateIsFramebufferOES(Context *context, GLuint framebuffer) |
| 1238 | { |
| 1239 | UNIMPLEMENTED(); |
| 1240 | return true; |
| 1241 | } |
| 1242 | |
| 1243 | bool ValidateIsRenderbufferOES(Context *context, GLuint renderbuffer) |
| 1244 | { |
| 1245 | UNIMPLEMENTED(); |
| 1246 | return true; |
| 1247 | } |
| 1248 | |
| 1249 | bool ValidateRenderbufferStorageOES(Context *context, |
| 1250 | GLenum target, |
| 1251 | GLint internalformat, |
| 1252 | GLsizei width, |
| 1253 | GLsizei height) |
| 1254 | { |
| 1255 | UNIMPLEMENTED(); |
| 1256 | return true; |
| 1257 | } |
| 1258 | |
| 1259 | // GL_OES_texture_cube_map |
| 1260 | |
| 1261 | bool ValidateGetTexGenfvOES(Context *context, GLenum coord, GLenum pname, GLfloat *params) |
| 1262 | { |
| 1263 | UNIMPLEMENTED(); |
| 1264 | return true; |
| 1265 | } |
| 1266 | |
| 1267 | bool ValidateGetTexGenivOES(Context *context, GLenum coord, GLenum pname, int *params) |
| 1268 | { |
| 1269 | UNIMPLEMENTED(); |
| 1270 | return true; |
| 1271 | } |
| 1272 | |
| 1273 | bool ValidateGetTexGenxvOES(Context *context, GLenum coord, GLenum pname, GLfixed *params) |
| 1274 | { |
| 1275 | UNIMPLEMENTED(); |
| 1276 | return true; |
| 1277 | } |
| 1278 | |
| 1279 | bool ValidateTexGenfvOES(Context *context, GLenum coord, GLenum pname, const GLfloat *params) |
| 1280 | { |
| 1281 | UNIMPLEMENTED(); |
| 1282 | return true; |
| 1283 | } |
| 1284 | |
| 1285 | bool ValidateTexGenivOES(Context *context, GLenum coord, GLenum pname, const GLint *param) |
| 1286 | { |
| 1287 | UNIMPLEMENTED(); |
| 1288 | return true; |
| 1289 | } |
| 1290 | |
| 1291 | bool ValidateTexGenxvOES(Context *context, GLenum coord, GLenum pname, const GLint *param) |
| 1292 | { |
| 1293 | UNIMPLEMENTED(); |
| 1294 | return true; |
| 1295 | } |
| 1296 | |
| 1297 | bool ValidateTexGenfOES(Context *context, GLenum coord, GLenum pname, GLfloat param) |
| 1298 | { |
| 1299 | UNIMPLEMENTED(); |
| 1300 | return true; |
| 1301 | } |
| 1302 | |
| 1303 | bool ValidateTexGeniOES(Context *context, GLenum coord, GLenum pname, GLint param) |
| 1304 | { |
| 1305 | UNIMPLEMENTED(); |
| 1306 | return true; |
| 1307 | } |
| 1308 | |
| 1309 | bool ValidateTexGenxOES(Context *context, GLenum coord, GLenum pname, GLfixed param) |
| 1310 | { |
| 1311 | UNIMPLEMENTED(); |
| 1312 | return true; |
| 1313 | } |
Lingfeng Yang | 0107443 | 2018-04-16 10:19:51 -0700 | [diff] [blame] | 1314 | |
| 1315 | } // namespace gl |