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 | 038dd53 | 2018-03-29 17:31:52 -0700 | [diff] [blame] | 14 | #include "libANGLE/validationES.h" |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 15 | |
| 16 | #define ANGLE_VALIDATE_IS_GLES1(context) \ |
| 17 | if (context->getClientMajorVersion() > 1) \ |
| 18 | { \ |
| 19 | ANGLE_VALIDATION_ERR(context, InvalidOperation(), GLES1Only); \ |
| 20 | return false; \ |
| 21 | } |
| 22 | |
| 23 | namespace |
| 24 | { |
| 25 | |
| 26 | bool ValidateAlphaFuncCommon(gl::Context *context, gl::AlphaTestFunc func) |
| 27 | { |
| 28 | switch (func) |
| 29 | { |
| 30 | case gl::AlphaTestFunc::AlwaysPass: |
| 31 | case gl::AlphaTestFunc::Equal: |
| 32 | case gl::AlphaTestFunc::Gequal: |
| 33 | case gl::AlphaTestFunc::Greater: |
| 34 | case gl::AlphaTestFunc::Lequal: |
| 35 | case gl::AlphaTestFunc::Less: |
| 36 | case gl::AlphaTestFunc::Never: |
| 37 | case gl::AlphaTestFunc::NotEqual: |
| 38 | return true; |
| 39 | default: |
| 40 | context->handleError(gl::InvalidEnum() << gl::kErrorEnumNotSupported); |
| 41 | return false; |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | } // anonymous namespace |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 46 | |
| 47 | namespace gl |
| 48 | { |
| 49 | |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 50 | bool ValidateAlphaFunc(Context *context, AlphaTestFunc func, GLfloat ref) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 51 | { |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 52 | ANGLE_VALIDATE_IS_GLES1(context); |
| 53 | return ValidateAlphaFuncCommon(context, func); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 54 | } |
| 55 | |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 56 | bool ValidateAlphaFuncx(Context *context, AlphaTestFunc func, GLfixed ref) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 57 | { |
Lingfeng Yang | 13b708f | 2018-03-21 12:14:10 -0700 | [diff] [blame] | 58 | ANGLE_VALIDATE_IS_GLES1(context); |
| 59 | return ValidateAlphaFuncCommon(context, func); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | bool ValidateClearColorx(Context *context, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) |
| 63 | { |
| 64 | UNIMPLEMENTED(); |
| 65 | return true; |
| 66 | } |
| 67 | |
| 68 | bool ValidateClearDepthx(Context *context, GLfixed depth) |
| 69 | { |
| 70 | UNIMPLEMENTED(); |
| 71 | return true; |
| 72 | } |
| 73 | |
| 74 | bool ValidateClientActiveTexture(Context *context, GLenum texture) |
| 75 | { |
Lingfeng Yang | 96310cd | 2018-03-28 11:56:28 -0700 | [diff] [blame] | 76 | ANGLE_VALIDATE_IS_GLES1(context); |
Lingfeng Yang | 038dd53 | 2018-03-29 17:31:52 -0700 | [diff] [blame] | 77 | return ValidateMultitextureUnit(context, texture); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 78 | } |
| 79 | |
| 80 | bool ValidateClipPlanef(Context *context, GLenum p, const GLfloat *eqn) |
| 81 | { |
| 82 | UNIMPLEMENTED(); |
| 83 | return true; |
| 84 | } |
| 85 | |
| 86 | bool ValidateClipPlanex(Context *context, GLenum plane, const GLfixed *equation) |
| 87 | { |
| 88 | UNIMPLEMENTED(); |
| 89 | return true; |
| 90 | } |
| 91 | |
| 92 | bool ValidateColor4f(Context *context, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) |
| 93 | { |
Lingfeng Yang | a43994c | 2018-03-29 07:21:41 -0700 | [diff] [blame] | 94 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 95 | return true; |
| 96 | } |
| 97 | |
| 98 | bool ValidateColor4ub(Context *context, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) |
| 99 | { |
Lingfeng Yang | a43994c | 2018-03-29 07:21:41 -0700 | [diff] [blame] | 100 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 101 | return true; |
| 102 | } |
| 103 | |
| 104 | bool ValidateColor4x(Context *context, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) |
| 105 | { |
Lingfeng Yang | a43994c | 2018-03-29 07:21:41 -0700 | [diff] [blame] | 106 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 107 | return true; |
| 108 | } |
| 109 | |
| 110 | bool ValidateColorPointer(Context *context, |
| 111 | GLint size, |
| 112 | GLenum type, |
| 113 | GLsizei stride, |
| 114 | const void *pointer) |
| 115 | { |
| 116 | UNIMPLEMENTED(); |
| 117 | return true; |
| 118 | } |
| 119 | |
| 120 | bool ValidateCullFace(Context *context, GLenum mode) |
| 121 | { |
| 122 | UNIMPLEMENTED(); |
| 123 | return true; |
| 124 | } |
| 125 | |
| 126 | bool ValidateDepthRangex(Context *context, GLfixed n, GLfixed f) |
| 127 | { |
| 128 | UNIMPLEMENTED(); |
| 129 | return true; |
| 130 | } |
| 131 | |
| 132 | bool ValidateDisableClientState(Context *context, GLenum array) |
| 133 | { |
| 134 | UNIMPLEMENTED(); |
| 135 | return true; |
| 136 | } |
| 137 | |
| 138 | bool ValidateEnableClientState(Context *context, GLenum array) |
| 139 | { |
| 140 | UNIMPLEMENTED(); |
| 141 | return true; |
| 142 | } |
| 143 | |
| 144 | bool ValidateFogf(Context *context, GLenum pname, GLfloat param) |
| 145 | { |
| 146 | UNIMPLEMENTED(); |
| 147 | return true; |
| 148 | } |
| 149 | |
| 150 | bool ValidateFogfv(Context *context, GLenum pname, const GLfloat *params) |
| 151 | { |
| 152 | UNIMPLEMENTED(); |
| 153 | return true; |
| 154 | } |
| 155 | |
| 156 | bool ValidateFogx(Context *context, GLenum pname, GLfixed param) |
| 157 | { |
| 158 | UNIMPLEMENTED(); |
| 159 | return true; |
| 160 | } |
| 161 | |
| 162 | bool ValidateFogxv(Context *context, GLenum pname, const GLfixed *param) |
| 163 | { |
| 164 | UNIMPLEMENTED(); |
| 165 | return true; |
| 166 | } |
| 167 | |
| 168 | bool ValidateFrustumf(Context *context, |
| 169 | GLfloat l, |
| 170 | GLfloat r, |
| 171 | GLfloat b, |
| 172 | GLfloat t, |
| 173 | GLfloat n, |
| 174 | GLfloat f) |
| 175 | { |
| 176 | UNIMPLEMENTED(); |
| 177 | return true; |
| 178 | } |
| 179 | |
| 180 | bool ValidateFrustumx(Context *context, |
| 181 | GLfixed l, |
| 182 | GLfixed r, |
| 183 | GLfixed b, |
| 184 | GLfixed t, |
| 185 | GLfixed n, |
| 186 | GLfixed f) |
| 187 | { |
| 188 | UNIMPLEMENTED(); |
| 189 | return true; |
| 190 | } |
| 191 | |
| 192 | bool ValidateGetBufferParameteriv(Context *context, GLenum target, GLenum pname, GLint *params) |
| 193 | { |
| 194 | UNIMPLEMENTED(); |
| 195 | return true; |
| 196 | } |
| 197 | |
| 198 | bool ValidateGetClipPlanef(Context *context, GLenum plane, GLfloat *equation) |
| 199 | { |
| 200 | UNIMPLEMENTED(); |
| 201 | return true; |
| 202 | } |
| 203 | |
| 204 | bool ValidateGetClipPlanex(Context *context, GLenum plane, GLfixed *equation) |
| 205 | { |
| 206 | UNIMPLEMENTED(); |
| 207 | return true; |
| 208 | } |
| 209 | |
| 210 | bool ValidateGetFixedv(Context *context, GLenum pname, GLfixed *params) |
| 211 | { |
| 212 | UNIMPLEMENTED(); |
| 213 | return true; |
| 214 | } |
| 215 | |
| 216 | bool ValidateGetLightfv(Context *context, GLenum light, GLenum pname, GLfloat *params) |
| 217 | { |
| 218 | UNIMPLEMENTED(); |
| 219 | return true; |
| 220 | } |
| 221 | |
| 222 | bool ValidateGetLightxv(Context *context, GLenum light, GLenum pname, GLfixed *params) |
| 223 | { |
| 224 | UNIMPLEMENTED(); |
| 225 | return true; |
| 226 | } |
| 227 | |
| 228 | bool ValidateGetMaterialfv(Context *context, GLenum face, GLenum pname, GLfloat *params) |
| 229 | { |
| 230 | UNIMPLEMENTED(); |
| 231 | return true; |
| 232 | } |
| 233 | |
| 234 | bool ValidateGetMaterialxv(Context *context, GLenum face, GLenum pname, GLfixed *params) |
| 235 | { |
| 236 | UNIMPLEMENTED(); |
| 237 | return true; |
| 238 | } |
| 239 | |
| 240 | bool ValidateGetPointerv(Context *context, GLenum pname, void **params) |
| 241 | { |
| 242 | UNIMPLEMENTED(); |
| 243 | return true; |
| 244 | } |
| 245 | |
| 246 | bool ValidateGetTexEnvfv(Context *context, GLenum target, GLenum pname, GLfloat *params) |
| 247 | { |
| 248 | UNIMPLEMENTED(); |
| 249 | return true; |
| 250 | } |
| 251 | |
| 252 | bool ValidateGetTexEnviv(Context *context, GLenum target, GLenum pname, GLint *params) |
| 253 | { |
| 254 | UNIMPLEMENTED(); |
| 255 | return true; |
| 256 | } |
| 257 | |
| 258 | bool ValidateGetTexEnvxv(Context *context, GLenum target, GLenum pname, GLfixed *params) |
| 259 | { |
| 260 | UNIMPLEMENTED(); |
| 261 | return true; |
| 262 | } |
| 263 | |
Corentin Wallez | f0e89be | 2017-11-08 14:00:32 -0800 | [diff] [blame] | 264 | bool ValidateGetTexParameterxv(Context *context, TextureType target, GLenum pname, GLfixed *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 265 | { |
| 266 | UNIMPLEMENTED(); |
| 267 | return true; |
| 268 | } |
| 269 | |
| 270 | bool ValidateLightModelf(Context *context, GLenum pname, GLfloat param) |
| 271 | { |
| 272 | UNIMPLEMENTED(); |
| 273 | return true; |
| 274 | } |
| 275 | |
| 276 | bool ValidateLightModelfv(Context *context, GLenum pname, const GLfloat *params) |
| 277 | { |
| 278 | UNIMPLEMENTED(); |
| 279 | return true; |
| 280 | } |
| 281 | |
| 282 | bool ValidateLightModelx(Context *context, GLenum pname, GLfixed param) |
| 283 | { |
| 284 | UNIMPLEMENTED(); |
| 285 | return true; |
| 286 | } |
| 287 | |
| 288 | bool ValidateLightModelxv(Context *context, GLenum pname, const GLfixed *param) |
| 289 | { |
| 290 | UNIMPLEMENTED(); |
| 291 | return true; |
| 292 | } |
| 293 | |
| 294 | bool ValidateLightf(Context *context, GLenum light, GLenum pname, GLfloat param) |
| 295 | { |
| 296 | UNIMPLEMENTED(); |
| 297 | return true; |
| 298 | } |
| 299 | |
| 300 | bool ValidateLightfv(Context *context, GLenum light, GLenum pname, const GLfloat *params) |
| 301 | { |
| 302 | UNIMPLEMENTED(); |
| 303 | return true; |
| 304 | } |
| 305 | |
| 306 | bool ValidateLightx(Context *context, GLenum light, GLenum pname, GLfixed param) |
| 307 | { |
| 308 | UNIMPLEMENTED(); |
| 309 | return true; |
| 310 | } |
| 311 | |
| 312 | bool ValidateLightxv(Context *context, GLenum light, GLenum pname, const GLfixed *params) |
| 313 | { |
| 314 | UNIMPLEMENTED(); |
| 315 | return true; |
| 316 | } |
| 317 | |
| 318 | bool ValidateLineWidthx(Context *context, GLfixed width) |
| 319 | { |
| 320 | UNIMPLEMENTED(); |
| 321 | return true; |
| 322 | } |
| 323 | |
| 324 | bool ValidateLoadIdentity(Context *context) |
| 325 | { |
Lingfeng Yang | 3a41af6 | 2018-04-09 07:28:56 -0700 | [diff] [blame^] | 326 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 327 | return true; |
| 328 | } |
| 329 | |
| 330 | bool ValidateLoadMatrixf(Context *context, const GLfloat *m) |
| 331 | { |
Lingfeng Yang | 3a41af6 | 2018-04-09 07:28:56 -0700 | [diff] [blame^] | 332 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 333 | return true; |
| 334 | } |
| 335 | |
| 336 | bool ValidateLoadMatrixx(Context *context, const GLfixed *m) |
| 337 | { |
Lingfeng Yang | 3a41af6 | 2018-04-09 07:28:56 -0700 | [diff] [blame^] | 338 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 339 | return true; |
| 340 | } |
| 341 | |
| 342 | bool ValidateLogicOp(Context *context, GLenum opcode) |
| 343 | { |
| 344 | UNIMPLEMENTED(); |
| 345 | return true; |
| 346 | } |
| 347 | |
| 348 | bool ValidateMaterialf(Context *context, GLenum face, GLenum pname, GLfloat param) |
| 349 | { |
| 350 | UNIMPLEMENTED(); |
| 351 | return true; |
| 352 | } |
| 353 | |
| 354 | bool ValidateMaterialfv(Context *context, GLenum face, GLenum pname, const GLfloat *params) |
| 355 | { |
| 356 | UNIMPLEMENTED(); |
| 357 | return true; |
| 358 | } |
| 359 | |
| 360 | bool ValidateMaterialx(Context *context, GLenum face, GLenum pname, GLfixed param) |
| 361 | { |
| 362 | UNIMPLEMENTED(); |
| 363 | return true; |
| 364 | } |
| 365 | |
| 366 | bool ValidateMaterialxv(Context *context, GLenum face, GLenum pname, const GLfixed *param) |
| 367 | { |
| 368 | UNIMPLEMENTED(); |
| 369 | return true; |
| 370 | } |
| 371 | |
Lingfeng Yang | 00af463 | 2018-04-02 12:42:24 -0700 | [diff] [blame] | 372 | bool ValidateMatrixMode(Context *context, MatrixType mode) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 373 | { |
Lingfeng Yang | d2488ab | 2018-04-04 09:25:48 -0700 | [diff] [blame] | 374 | ANGLE_VALIDATE_IS_GLES1(context); |
| 375 | switch (mode) |
| 376 | { |
| 377 | case MatrixType::Projection: |
| 378 | case MatrixType::Modelview: |
| 379 | case MatrixType::Texture: |
| 380 | return true; |
| 381 | default: |
| 382 | ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidMatrixMode); |
| 383 | return false; |
| 384 | } |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 385 | } |
| 386 | |
| 387 | bool ValidateMultMatrixf(Context *context, const GLfloat *m) |
| 388 | { |
| 389 | UNIMPLEMENTED(); |
| 390 | return true; |
| 391 | } |
| 392 | |
| 393 | bool ValidateMultMatrixx(Context *context, const GLfixed *m) |
| 394 | { |
| 395 | UNIMPLEMENTED(); |
| 396 | return true; |
| 397 | } |
| 398 | |
| 399 | bool ValidateMultiTexCoord4f(Context *context, |
| 400 | GLenum target, |
| 401 | GLfloat s, |
| 402 | GLfloat t, |
| 403 | GLfloat r, |
| 404 | GLfloat q) |
| 405 | { |
Lingfeng Yang | 038dd53 | 2018-03-29 17:31:52 -0700 | [diff] [blame] | 406 | ANGLE_VALIDATE_IS_GLES1(context); |
| 407 | return ValidateMultitextureUnit(context, target); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 408 | } |
| 409 | |
| 410 | bool ValidateMultiTexCoord4x(Context *context, |
Lingfeng Yang | 038dd53 | 2018-03-29 17:31:52 -0700 | [diff] [blame] | 411 | GLenum target, |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 412 | GLfixed s, |
| 413 | GLfixed t, |
| 414 | GLfixed r, |
| 415 | GLfixed q) |
| 416 | { |
Lingfeng Yang | 038dd53 | 2018-03-29 17:31:52 -0700 | [diff] [blame] | 417 | ANGLE_VALIDATE_IS_GLES1(context); |
| 418 | return ValidateMultitextureUnit(context, target); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 419 | } |
| 420 | |
| 421 | bool ValidateNormal3f(Context *context, GLfloat nx, GLfloat ny, GLfloat nz) |
| 422 | { |
Lingfeng Yang | 5a7e61b | 2018-03-29 16:50:32 -0700 | [diff] [blame] | 423 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 424 | return true; |
| 425 | } |
| 426 | |
| 427 | bool ValidateNormal3x(Context *context, GLfixed nx, GLfixed ny, GLfixed nz) |
| 428 | { |
Lingfeng Yang | 5a7e61b | 2018-03-29 16:50:32 -0700 | [diff] [blame] | 429 | ANGLE_VALIDATE_IS_GLES1(context); |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 430 | return true; |
| 431 | } |
| 432 | |
| 433 | bool ValidateNormalPointer(Context *context, GLenum type, GLsizei stride, const void *pointer) |
| 434 | { |
| 435 | UNIMPLEMENTED(); |
| 436 | return true; |
| 437 | } |
| 438 | |
| 439 | bool ValidateOrthof(Context *context, |
| 440 | GLfloat l, |
| 441 | GLfloat r, |
| 442 | GLfloat b, |
| 443 | GLfloat t, |
| 444 | GLfloat n, |
| 445 | GLfloat f) |
| 446 | { |
| 447 | UNIMPLEMENTED(); |
| 448 | return true; |
| 449 | } |
| 450 | |
| 451 | bool ValidateOrthox(Context *context, |
| 452 | GLfixed l, |
| 453 | GLfixed r, |
| 454 | GLfixed b, |
| 455 | GLfixed t, |
| 456 | GLfixed n, |
| 457 | GLfixed f) |
| 458 | { |
| 459 | UNIMPLEMENTED(); |
| 460 | return true; |
| 461 | } |
| 462 | |
| 463 | bool ValidatePointParameterf(Context *context, GLenum pname, GLfloat param) |
| 464 | { |
| 465 | UNIMPLEMENTED(); |
| 466 | return true; |
| 467 | } |
| 468 | |
| 469 | bool ValidatePointParameterfv(Context *context, GLenum pname, const GLfloat *params) |
| 470 | { |
| 471 | UNIMPLEMENTED(); |
| 472 | return true; |
| 473 | } |
| 474 | |
| 475 | bool ValidatePointParameterx(Context *context, GLenum pname, GLfixed param) |
| 476 | { |
| 477 | UNIMPLEMENTED(); |
| 478 | return true; |
| 479 | } |
| 480 | |
| 481 | bool ValidatePointParameterxv(Context *context, GLenum pname, const GLfixed *params) |
| 482 | { |
| 483 | UNIMPLEMENTED(); |
| 484 | return true; |
| 485 | } |
| 486 | |
| 487 | bool ValidatePointSize(Context *context, GLfloat size) |
| 488 | { |
| 489 | UNIMPLEMENTED(); |
| 490 | return true; |
| 491 | } |
| 492 | |
| 493 | bool ValidatePointSizex(Context *context, GLfixed size) |
| 494 | { |
| 495 | UNIMPLEMENTED(); |
| 496 | return true; |
| 497 | } |
| 498 | |
| 499 | bool ValidatePolygonOffsetx(Context *context, GLfixed factor, GLfixed units) |
| 500 | { |
| 501 | UNIMPLEMENTED(); |
| 502 | return true; |
| 503 | } |
| 504 | |
| 505 | bool ValidatePopMatrix(Context *context) |
| 506 | { |
Lingfeng Yang | e547aac | 2018-04-05 09:39:20 -0700 | [diff] [blame] | 507 | ANGLE_VALIDATE_IS_GLES1(context); |
| 508 | const auto &stack = context->getGLState().gles1().currentMatrixStack(); |
| 509 | if (stack.size() == 1) |
| 510 | { |
| 511 | ANGLE_VALIDATION_ERR(context, StackUnderflow(), MatrixStackUnderflow); |
| 512 | return false; |
| 513 | } |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 514 | return true; |
| 515 | } |
| 516 | |
| 517 | bool ValidatePushMatrix(Context *context) |
| 518 | { |
Lingfeng Yang | e547aac | 2018-04-05 09:39:20 -0700 | [diff] [blame] | 519 | ANGLE_VALIDATE_IS_GLES1(context); |
| 520 | const auto &stack = context->getGLState().gles1().currentMatrixStack(); |
| 521 | if (stack.size() == stack.max_size()) |
| 522 | { |
| 523 | ANGLE_VALIDATION_ERR(context, StackOverflow(), MatrixStackOverflow); |
| 524 | return false; |
| 525 | } |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 526 | return true; |
| 527 | } |
| 528 | |
| 529 | bool ValidateRotatef(Context *context, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) |
| 530 | { |
| 531 | UNIMPLEMENTED(); |
| 532 | return true; |
| 533 | } |
| 534 | |
| 535 | bool ValidateRotatex(Context *context, GLfixed angle, GLfixed x, GLfixed y, GLfixed z) |
| 536 | { |
| 537 | UNIMPLEMENTED(); |
| 538 | return true; |
| 539 | } |
| 540 | |
| 541 | bool ValidateSampleCoveragex(Context *context, GLclampx value, GLboolean invert) |
| 542 | { |
| 543 | UNIMPLEMENTED(); |
| 544 | return true; |
| 545 | } |
| 546 | |
| 547 | bool ValidateScalef(Context *context, GLfloat x, GLfloat y, GLfloat z) |
| 548 | { |
| 549 | UNIMPLEMENTED(); |
| 550 | return true; |
| 551 | } |
| 552 | |
| 553 | bool ValidateScalex(Context *context, GLfixed x, GLfixed y, GLfixed z) |
| 554 | { |
| 555 | UNIMPLEMENTED(); |
| 556 | return true; |
| 557 | } |
| 558 | |
| 559 | bool ValidateShadeModel(Context *context, GLenum mode) |
| 560 | { |
| 561 | UNIMPLEMENTED(); |
| 562 | return true; |
| 563 | } |
| 564 | |
| 565 | bool ValidateTexCoordPointer(Context *context, |
| 566 | GLint size, |
| 567 | GLenum type, |
| 568 | GLsizei stride, |
| 569 | const void *pointer) |
| 570 | { |
| 571 | UNIMPLEMENTED(); |
| 572 | return true; |
| 573 | } |
| 574 | |
| 575 | bool ValidateTexEnvf(Context *context, GLenum target, GLenum pname, GLfloat param) |
| 576 | { |
| 577 | UNIMPLEMENTED(); |
| 578 | return true; |
| 579 | } |
| 580 | |
| 581 | bool ValidateTexEnvfv(Context *context, GLenum target, GLenum pname, const GLfloat *params) |
| 582 | { |
| 583 | UNIMPLEMENTED(); |
| 584 | return true; |
| 585 | } |
| 586 | |
| 587 | bool ValidateTexEnvi(Context *context, GLenum target, GLenum pname, GLint param) |
| 588 | { |
| 589 | UNIMPLEMENTED(); |
| 590 | return true; |
| 591 | } |
| 592 | |
| 593 | bool ValidateTexEnviv(Context *context, GLenum target, GLenum pname, const GLint *params) |
| 594 | { |
| 595 | UNIMPLEMENTED(); |
| 596 | return true; |
| 597 | } |
| 598 | |
| 599 | bool ValidateTexEnvx(Context *context, GLenum target, GLenum pname, GLfixed param) |
| 600 | { |
| 601 | UNIMPLEMENTED(); |
| 602 | return true; |
| 603 | } |
| 604 | |
| 605 | bool ValidateTexEnvxv(Context *context, GLenum target, GLenum pname, const GLfixed *params) |
| 606 | { |
| 607 | UNIMPLEMENTED(); |
| 608 | return true; |
| 609 | } |
| 610 | |
Corentin Wallez | f0e89be | 2017-11-08 14:00:32 -0800 | [diff] [blame] | 611 | bool ValidateTexParameterx(Context *context, TextureType target, GLenum pname, GLfixed param) |
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 ValidateTexParameterxv(Context *context, |
| 618 | TextureType target, |
| 619 | GLenum pname, |
| 620 | const GLfixed *params) |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 621 | { |
| 622 | UNIMPLEMENTED(); |
| 623 | return true; |
| 624 | } |
| 625 | |
| 626 | bool ValidateTranslatef(Context *context, GLfloat x, GLfloat y, GLfloat z) |
| 627 | { |
| 628 | UNIMPLEMENTED(); |
| 629 | return true; |
| 630 | } |
| 631 | |
| 632 | bool ValidateTranslatex(Context *context, GLfixed x, GLfixed y, GLfixed z) |
| 633 | { |
| 634 | UNIMPLEMENTED(); |
| 635 | return true; |
| 636 | } |
| 637 | |
| 638 | bool ValidateVertexPointer(Context *context, |
| 639 | GLint size, |
| 640 | GLenum type, |
| 641 | GLsizei stride, |
| 642 | const void *pointer) |
| 643 | { |
| 644 | UNIMPLEMENTED(); |
| 645 | return true; |
| 646 | } |
| 647 | |
| 648 | bool ValidateDrawTexfOES(Context *context, |
| 649 | GLfloat x, |
| 650 | GLfloat y, |
| 651 | GLfloat z, |
| 652 | GLfloat width, |
| 653 | GLfloat height) |
| 654 | { |
| 655 | UNIMPLEMENTED(); |
| 656 | return true; |
| 657 | } |
| 658 | |
| 659 | bool ValidateDrawTexfvOES(Context *context, const GLfloat *coords) |
| 660 | { |
| 661 | UNIMPLEMENTED(); |
| 662 | return true; |
| 663 | } |
| 664 | |
| 665 | bool ValidateDrawTexiOES(Context *context, GLint x, GLint y, GLint z, GLint width, GLint height) |
| 666 | { |
| 667 | UNIMPLEMENTED(); |
| 668 | return true; |
| 669 | } |
| 670 | |
| 671 | bool ValidateDrawTexivOES(Context *context, const GLint *coords) |
| 672 | { |
| 673 | UNIMPLEMENTED(); |
| 674 | return true; |
| 675 | } |
| 676 | |
| 677 | bool ValidateDrawTexsOES(Context *context, |
| 678 | GLshort x, |
| 679 | GLshort y, |
| 680 | GLshort z, |
| 681 | GLshort width, |
| 682 | GLshort height) |
| 683 | { |
| 684 | UNIMPLEMENTED(); |
| 685 | return true; |
| 686 | } |
| 687 | |
| 688 | bool ValidateDrawTexsvOES(Context *context, const GLshort *coords) |
| 689 | { |
| 690 | UNIMPLEMENTED(); |
| 691 | return true; |
| 692 | } |
| 693 | |
| 694 | bool ValidateDrawTexxOES(Context *context, |
| 695 | GLfixed x, |
| 696 | GLfixed y, |
| 697 | GLfixed z, |
| 698 | GLfixed width, |
| 699 | GLfixed height) |
| 700 | { |
| 701 | UNIMPLEMENTED(); |
| 702 | return true; |
| 703 | } |
| 704 | |
| 705 | bool ValidateDrawTexxvOES(Context *context, const GLfixed *coords) |
| 706 | { |
| 707 | UNIMPLEMENTED(); |
| 708 | return true; |
| 709 | } |
| 710 | |
| 711 | bool ValidateCurrentPaletteMatrixOES(Context *context, GLuint matrixpaletteindex) |
| 712 | { |
| 713 | UNIMPLEMENTED(); |
| 714 | return true; |
| 715 | } |
| 716 | |
| 717 | bool ValidateLoadPaletteFromModelViewMatrixOES(Context *context) |
| 718 | { |
| 719 | UNIMPLEMENTED(); |
| 720 | return true; |
| 721 | } |
| 722 | |
| 723 | bool ValidateMatrixIndexPointerOES(Context *context, |
| 724 | GLint size, |
| 725 | GLenum type, |
| 726 | GLsizei stride, |
| 727 | const void *pointer) |
| 728 | { |
| 729 | UNIMPLEMENTED(); |
| 730 | return true; |
| 731 | } |
| 732 | |
| 733 | bool ValidateWeightPointerOES(Context *context, |
| 734 | GLint size, |
| 735 | GLenum type, |
| 736 | GLsizei stride, |
| 737 | const void *pointer) |
| 738 | { |
| 739 | UNIMPLEMENTED(); |
| 740 | return true; |
| 741 | } |
| 742 | |
| 743 | bool ValidatePointSizePointerOES(Context *context, GLenum type, GLsizei stride, const void *pointer) |
| 744 | { |
| 745 | UNIMPLEMENTED(); |
| 746 | return true; |
| 747 | } |
| 748 | |
| 749 | bool ValidateQueryMatrixxOES(Context *context, GLfixed *mantissa, GLint *exponent) |
| 750 | { |
| 751 | UNIMPLEMENTED(); |
| 752 | return true; |
| 753 | } |
Lingfeng Yang | a064878 | 2018-03-12 14:45:25 -0700 | [diff] [blame] | 754 | |
| 755 | bool ValidateGenFramebuffersOES(Context *context, GLsizei n, GLuint *framebuffers) |
| 756 | { |
| 757 | UNIMPLEMENTED(); |
| 758 | return true; |
| 759 | } |
| 760 | |
| 761 | bool ValidateDeleteFramebuffersOES(Context *context, GLsizei n, const GLuint *framebuffers) |
| 762 | { |
| 763 | UNIMPLEMENTED(); |
| 764 | return true; |
| 765 | } |
| 766 | |
| 767 | bool ValidateGenRenderbuffersOES(Context *context, GLsizei n, GLuint *renderbuffers) |
| 768 | { |
| 769 | UNIMPLEMENTED(); |
| 770 | return true; |
| 771 | } |
| 772 | |
| 773 | bool ValidateDeleteRenderbuffersOES(Context *context, GLsizei n, const GLuint *renderbuffers) |
| 774 | { |
| 775 | UNIMPLEMENTED(); |
| 776 | return true; |
| 777 | } |
| 778 | |
| 779 | bool ValidateBindFramebufferOES(Context *context, GLenum target, GLuint framebuffer) |
| 780 | { |
| 781 | UNIMPLEMENTED(); |
| 782 | return true; |
| 783 | } |
| 784 | |
| 785 | bool ValidateBindRenderbufferOES(Context *context, GLenum target, GLuint renderbuffer) |
| 786 | { |
| 787 | UNIMPLEMENTED(); |
| 788 | return true; |
| 789 | } |
| 790 | |
| 791 | bool ValidateCheckFramebufferStatusOES(Context *context, GLenum target) |
| 792 | { |
| 793 | UNIMPLEMENTED(); |
| 794 | return true; |
| 795 | } |
| 796 | |
| 797 | bool ValidateFramebufferRenderbufferOES(Context *context, |
| 798 | GLenum target, |
| 799 | GLenum attachment, |
| 800 | GLenum rbtarget, |
| 801 | GLuint renderbuffer) |
| 802 | { |
| 803 | UNIMPLEMENTED(); |
| 804 | return true; |
| 805 | } |
| 806 | |
| 807 | bool ValidateFramebufferTexture2DOES(Context *context, |
| 808 | GLenum target, |
| 809 | GLenum attachment, |
| 810 | TextureTarget textarget, |
| 811 | GLuint texture, |
| 812 | GLint level) |
| 813 | { |
| 814 | UNIMPLEMENTED(); |
| 815 | return true; |
| 816 | } |
| 817 | |
| 818 | bool ValidateGenerateMipmapOES(Context *context, TextureType target) |
| 819 | { |
| 820 | UNIMPLEMENTED(); |
| 821 | return true; |
| 822 | } |
| 823 | |
| 824 | bool ValidateGetFramebufferAttachmentParameterivOES(Context *context, |
| 825 | GLenum target, |
| 826 | GLenum attachment, |
| 827 | GLenum pname, |
| 828 | GLint *params) |
| 829 | { |
| 830 | UNIMPLEMENTED(); |
| 831 | return true; |
| 832 | } |
| 833 | |
| 834 | bool ValidateGetRenderbufferParameterivOES(Context *context, |
| 835 | GLenum target, |
| 836 | GLenum pname, |
| 837 | GLint *params) |
| 838 | { |
| 839 | UNIMPLEMENTED(); |
| 840 | return true; |
| 841 | } |
| 842 | |
| 843 | bool ValidateIsFramebufferOES(Context *context, GLuint framebuffer) |
| 844 | { |
| 845 | UNIMPLEMENTED(); |
| 846 | return true; |
| 847 | } |
| 848 | |
| 849 | bool ValidateIsRenderbufferOES(Context *context, GLuint renderbuffer) |
| 850 | { |
| 851 | UNIMPLEMENTED(); |
| 852 | return true; |
| 853 | } |
| 854 | |
| 855 | bool ValidateRenderbufferStorageOES(Context *context, |
| 856 | GLenum target, |
| 857 | GLint internalformat, |
| 858 | GLsizei width, |
| 859 | GLsizei height) |
| 860 | { |
| 861 | UNIMPLEMENTED(); |
| 862 | return true; |
| 863 | } |
| 864 | |
| 865 | // GL_OES_texture_cube_map |
| 866 | |
| 867 | bool ValidateGetTexGenfvOES(Context *context, GLenum coord, GLenum pname, GLfloat *params) |
| 868 | { |
| 869 | UNIMPLEMENTED(); |
| 870 | return true; |
| 871 | } |
| 872 | |
| 873 | bool ValidateGetTexGenivOES(Context *context, GLenum coord, GLenum pname, int *params) |
| 874 | { |
| 875 | UNIMPLEMENTED(); |
| 876 | return true; |
| 877 | } |
| 878 | |
| 879 | bool ValidateGetTexGenxvOES(Context *context, GLenum coord, GLenum pname, GLfixed *params) |
| 880 | { |
| 881 | UNIMPLEMENTED(); |
| 882 | return true; |
| 883 | } |
| 884 | |
| 885 | bool ValidateTexGenfvOES(Context *context, GLenum coord, GLenum pname, const GLfloat *params) |
| 886 | { |
| 887 | UNIMPLEMENTED(); |
| 888 | return true; |
| 889 | } |
| 890 | |
| 891 | bool ValidateTexGenivOES(Context *context, GLenum coord, GLenum pname, const GLint *param) |
| 892 | { |
| 893 | UNIMPLEMENTED(); |
| 894 | return true; |
| 895 | } |
| 896 | |
| 897 | bool ValidateTexGenxvOES(Context *context, GLenum coord, GLenum pname, const GLint *param) |
| 898 | { |
| 899 | UNIMPLEMENTED(); |
| 900 | return true; |
| 901 | } |
| 902 | |
| 903 | bool ValidateTexGenfOES(Context *context, GLenum coord, GLenum pname, GLfloat param) |
| 904 | { |
| 905 | UNIMPLEMENTED(); |
| 906 | return true; |
| 907 | } |
| 908 | |
| 909 | bool ValidateTexGeniOES(Context *context, GLenum coord, GLenum pname, GLint param) |
| 910 | { |
| 911 | UNIMPLEMENTED(); |
| 912 | return true; |
| 913 | } |
| 914 | |
| 915 | bool ValidateTexGenxOES(Context *context, GLenum coord, GLenum pname, GLfixed param) |
| 916 | { |
| 917 | UNIMPLEMENTED(); |
| 918 | return true; |
| 919 | } |
Geoff Lang | 2aaa7b4 | 2018-01-12 17:17:27 -0500 | [diff] [blame] | 920 | } |