Changeset 55623 in vbox
- Timestamp:
- May 3, 2015 3:33:55 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c
r52262 r55623 454 454 CRASSERT(slot < pack_spu.numContexts); 455 455 456 context = &(pack_spu.context[slot]); 457 458 if (CRPACKSPU_IS_WDDM_CRHGSMI()) 459 { 460 thread = context->currentThread; 461 crPackSetContext(thread->packer); 462 CRASSERT(!(thread->packer == curPacker) == !(thread == curThread)); 463 } 464 CRASSERT(thread); 456 context = (slot >= 0 && slot < pack_spu.numContexts) ? &(pack_spu.context[slot]) : NULL; 465 457 curContext = curThread ? curThread->currentContext : NULL; 466 458 467 if (pack_spu.swap) 468 crPackDestroyContextSWAP( context->serverCtx ); 469 else 470 crPackDestroyContext( context->serverCtx ); 471 472 crStateDestroyContext( context->clientState ); 473 474 context->clientState = NULL; 475 context->serverCtx = 0; 476 context->currentThread = NULL; 477 478 crMemset (&context->zvaBufferInfo, 0, sizeof (context->zvaBufferInfo)); 459 if (context) 460 { 461 if (CRPACKSPU_IS_WDDM_CRHGSMI()) 462 { 463 thread = context->currentThread; 464 if (thread) 465 { 466 crPackSetContext(thread->packer); 467 CRASSERT(!(thread->packer == curPacker) == !(thread == curThread)); 468 } 469 } 470 471 if (pack_spu.swap) 472 crPackDestroyContextSWAP( context->serverCtx ); 473 else 474 crPackDestroyContext( context->serverCtx ); 475 476 crStateDestroyContext( context->clientState ); 477 478 context->clientState = NULL; 479 context->serverCtx = 0; 480 context->currentThread = NULL; 481 482 crMemset (&context->zvaBufferInfo, 0, sizeof (context->zvaBufferInfo)); 483 } 479 484 480 485 if (curContext == context) … … 503 508 void PACKSPU_APIENTRY packspu_MakeCurrent( GLint window, GLint nativeWindow, GLint ctx ) 504 509 { 505 ThreadInfo *thread ;510 ThreadInfo *thread = NULL; 506 511 GLint serverCtx; 507 ContextInfo *newCtx ;512 ContextInfo *newCtx = NULL; 508 513 509 514 if (!CRPACKSPU_IS_WDDM_CRHGSMI()) … … 528 533 529 534 newCtx = &pack_spu.context[slot]; 535 CRASSERT(newCtx); 530 536 CRASSERT(newCtx->clientState); /* verify valid */ 531 537 … … 539 545 else 540 546 { 547 CRASSERT(thread); 541 548 if (newCtx->fAutoFlush) 542 549 {
Note:
See TracChangeset
for help on using the changeset viewer.

