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