VirtualBox

Changeset 39051 in vbox


Ignore:
Timestamp:
Oct 20, 2011 9:52:39 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
74471
Message:

crOpenGL: use one statetracker for all guest SPUs

Location:
trunk/src/VBox/Additions/common/crOpenGL/pack
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c

    r38374 r39051  
    173173    /* Fill in the new context info */
    174174    /* XXX fix-up sharedCtx param here */
     175#ifdef CR_DUP_CTXSTATE
    175176    pack_spu.context[slot].clientState = crStateCreateContext(NULL, visual, NULL);
     177#else
     178    pack_spu.context[slot].clientState = crStateGetCurrent();
     179#endif
     180    CRASSERT(pack_spu.context[slot].clientState);
    176181    pack_spu.context[slot].clientState->bufferobject.retainBufferData = GL_TRUE;
    177182    pack_spu.context[slot].serverCtx = serverCtx;
     
    202207        crPackDestroyContext( context->serverCtx );
    203208
     209#ifdef CR_DUP_CTXSTATE
    204210    crStateDestroyContext( context->clientState );
     211#endif
    205212
    206213    context->clientState = NULL;
     
    256263
    257264        crPackSetContext( thread->packer );
     265#ifdef CR_DUP_CTXSTATE
    258266        crStateMakeCurrent( newCtx->clientState );
     267#else
     268        CRASSERT(newCtx->clientState==crStateGetCurrent());
     269#endif
    259270        //crStateSetCurrentPointers(newCtx->clientState, &thread->packer->current);
    260271        serverCtx = pack_spu.context[slot].serverCtx;
     
    262273    else {
    263274        thread->currentContext = NULL;
     275#ifdef CR_DUP_CTXSTATE
    264276        crStateMakeCurrent( NULL );
     277#endif
    265278        newCtx = NULL;
    266279        serverCtx = 0;
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_init.c

    r33988 r39051  
    5757
    5858    packspuCreateFunctions();
     59#ifdef CR_DUP_CTXSTATE
    5960    crStateInit();
     61#endif
    6062
    6163    return &pack_functions;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette