Changeset 78105 in vbox for trunk/src/VBox/GuestHost/OpenGL
- Timestamp:
- Apr 10, 2019 8:01:12 PM (6 years ago)
- Location:
- trunk/src/VBox/GuestHost/OpenGL/state_tracker
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_evaluators.c
r69392 r78105 360 360 } 361 361 362 switch (target) { 363 case GL_MAP1_VERTEX_3: 364 case GL_MAP1_VERTEX_4: 365 case GL_MAP1_INDEX: 366 case GL_MAP1_COLOR_4: 367 case GL_MAP1_NORMAL: 368 case GL_MAP1_TEXTURE_COORD_1: 369 case GL_MAP1_TEXTURE_COORD_2: 370 case GL_MAP1_TEXTURE_COORD_3: 371 case GL_MAP1_TEXTURE_COORD_4: 372 break; 373 default: 374 crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glMap1d(bad target)"); 375 return; 376 } 377 362 378 i = target - GL_MAP1_COLOR_4; 363 379 … … 378 394 crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, 379 395 "glMap1d(current texture unit must be zero)"); 380 return;381 }382 383 switch (target) {384 case GL_MAP1_VERTEX_3:385 case GL_MAP1_VERTEX_4:386 case GL_MAP1_INDEX:387 case GL_MAP1_COLOR_4:388 case GL_MAP1_NORMAL:389 case GL_MAP1_TEXTURE_COORD_1:390 case GL_MAP1_TEXTURE_COORD_2:391 case GL_MAP1_TEXTURE_COORD_3:392 case GL_MAP1_TEXTURE_COORD_4:393 break;394 default:395 crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glMap1d(bad target)");396 396 return; 397 397 } … … 474 474 } 475 475 476 if (g->extensions.NV_vertex_program) { 476 switch (target) { 477 case GL_MAP2_VERTEX_3: 478 case GL_MAP2_VERTEX_4: 479 case GL_MAP2_INDEX: 480 case GL_MAP2_COLOR_4: 481 case GL_MAP2_NORMAL: 482 case GL_MAP2_TEXTURE_COORD_1: 483 case GL_MAP2_TEXTURE_COORD_2: 484 case GL_MAP2_TEXTURE_COORD_3: 485 case GL_MAP2_TEXTURE_COORD_4: 486 break; 487 default: 488 crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glMap2d()"); 489 return; 490 } 491 492 if (g->extensions.NV_vertex_program) { 477 493 /* XXX FIXME */ 478 494 i = target - GL_MAP2_COLOR_4; … … 508 524 } 509 525 #endif 510 511 switch (target) {512 case GL_MAP2_VERTEX_3:513 case GL_MAP2_VERTEX_4:514 case GL_MAP2_INDEX:515 case GL_MAP2_COLOR_4:516 case GL_MAP2_NORMAL:517 case GL_MAP2_TEXTURE_COORD_1:518 case GL_MAP2_TEXTURE_COORD_2:519 case GL_MAP2_TEXTURE_COORD_3:520 case GL_MAP2_TEXTURE_COORD_4:521 break;522 default:523 crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glMap2d()");524 return;525 }526 526 527 527 /* make copy of the control points */ -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_teximage.c
r76811 r78105 218 218 CRTextureState *t = &(g->texture); 219 219 CRTextureUnit *unit = t->unit + t->curTextureUnit; 220 221 if (level < 0 || level > MaxTextureLevel(g, texTarget)) { 222 crWarning("Wrong texture level=%d", level); 223 *obj = NULL; 224 *img = NULL; 225 return; 226 } 227 228 if (level < 0 || level >= CR_MAX_MIPMAP_LEVELS) 229 { 230 crWarning("unexpected level 0x%x", level); 231 *obj = NULL; 232 *img = NULL; 233 } 220 234 221 235 switch (texTarget) { … … 691 705 CRTextureLevel *tl = NULL; 692 706 (void)x; (void)y; 707 708 if (level < 0 || level > MaxTextureLevel(g, target)) { 709 crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, 710 "crStateCopyTexImage2D: invalid level: %d", level); 711 return; 712 } 693 713 694 714 crStateGetTextureObjectAndImage(g, target, level, &tobj, &tl);
Note:
See TracChangeset
for help on using the changeset viewer.