VirtualBox

Changeset 34107 in vbox for trunk/src/VBox/GuestHost


Ignore:
Timestamp:
Nov 16, 2010 11:37:51 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
67809
Message:

crOpenGL/wddm: resync shared data only once

Location:
trunk/src/VBox/GuestHost/OpenGL
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_glstate.h

    r34053 r34107  
    105105    GLint id;                   /*unique shared state id, it's not always matching some existing context id!*/
    106106    GLint saveCount;
     107
     108    /* Indicates that we have to resend data to GPU on first glMakeCurrent call with owning context */
     109    GLboolean   bTexResyncNeeded;
     110    GLboolean   bVBOResyncNeeded;
     111    GLboolean   bFBOResyncNeeded;
    107112} CRSharedState;
    108113
  • trunk/src/VBox/GuestHost/OpenGL/include/state/cr_bufferobject.h

    r31808 r34107  
    5252
    5353        CRBufferObject *nullBuffer;  /* name = 0 */
    54 
    55     GLboolean   bResyncNeeded;
    5654} CRBufferObjectState;
    5755
  • trunk/src/VBox/GuestHost/OpenGL/include/state/cr_framebuffer.h

    r31808 r34107  
    6262    CRFramebufferObject     *readFB, *drawFB;
    6363    CRRenderbufferObject    *renderbuffer;
    64 
    65     /* Indicates that we have to resend FBO data to GPU on first glMakeCurrent call with owning context */
    66     GLboolean   bResyncNeeded;
    6764} CRFramebufferObjectState;
    6865
  • trunk/src/VBox/GuestHost/OpenGL/include/state/cr_texture.h

    r31808 r34107  
    203203    GLboolean   broadcastTextures; /*@todo what is it for?*/
    204204
    205     /* Indicates that we have to resend texture data to GPU on first glMakeCurrent call with owning context */
    206     GLboolean   bResyncNeeded;
    207 
    208205    /* Per-texture unit state: */
    209206    CRTextureUnit   unit[CR_MAX_TEXTURE_UNITS];
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_bufferobject.c

    r33540 r34107  
    9898#endif
    9999
    100     b->bResyncNeeded = GL_FALSE;
     100    ctx->shared->bVBOResyncNeeded = GL_FALSE;
    101101}
    102102
     
    988988        return;
    989989
    990     if (to->bResyncNeeded)
     990    if (toCtx->shared->bVBOResyncNeeded)
    991991    {
    992992        CRClientPointer *cp;
     
    994994
    995995        crHashtableWalk(toCtx->shared->buffersTable, crStateBufferObjectSyncCB, to);
    996         to->bResyncNeeded = GL_FALSE;
     996        toCtx->shared->bVBOResyncNeeded = GL_FALSE;
    997997
    998998        /*@todo, move to state_client.c*/
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_framebuffer.c

    r31808 r34107  
    3737    fbo->drawFB = NULL;
    3838    fbo->renderbuffer = NULL;
    39     fbo->bResyncNeeded = GL_FALSE;
     39    ctx->shared->bFBOResyncNeeded = GL_FALSE;
    4040}
    4141
     
    693693crStateFramebufferObjectSwitch(CRContext *from, CRContext *to)
    694694{
    695     if (to->framebufferobject.bResyncNeeded)
    696     {
    697         to->framebufferobject.bResyncNeeded = GL_FALSE;
     695    if (to->shared->bFBOResyncNeeded)
     696    {
     697        to->shared->bFBOResyncNeeded = GL_FALSE;
    698698
    699699        crHashtableWalk(to->shared->rbTable, crStateSyncRenderbuffersCB, NULL);
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_snapshot.c

    r34053 r34107  
    8989             * For ex. we're saving snapshot right after it was loaded
    9090             * and some context hasn't been used by the guest application yet
    91              * (pContext->texture.bResyncNeeded==GL_TRUE).
     91             * (pContext->shared->bTexResyncNeeded==GL_TRUE).
    9292             */
    9393            else if (ptl->bytes)
     
    16301630
    16311631    /* Mark textures for resending to GPU */
    1632     pContext->texture.bResyncNeeded = GL_TRUE;
     1632    pContext->shared->bTexResyncNeeded = GL_TRUE;
    16331633
    16341634    /* Load lights */
     
    17781778    }
    17791779
    1780     pContext->bufferobject.bResyncNeeded = GL_TRUE;
     1780    pContext->shared->bVBOResyncNeeded = GL_TRUE;
    17811781#endif
    17821782
     
    18671867
    18681868    /* Mark FBOs/RBOs for resending to GPU */
    1869     pContext->framebufferobject.bResyncNeeded = GL_TRUE;
     1869    pContext->shared->bFBOResyncNeeded = GL_TRUE;
    18701870#endif
    18711871
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_texdiff.c

    r32058 r34107  
    501501
    502502    /* Resend texture images */
    503     if (toCtx->texture.bResyncNeeded)
     503    if (toCtx->shared->bTexResyncNeeded)
    504504    {
    505         toCtx->texture.bResyncNeeded = GL_FALSE;
     505        toCtx->shared->bTexResyncNeeded = GL_FALSE;
    506506
    507507        crStateDiffAllTextureObjects(toCtx, bitID, GL_TRUE);
Note: See TracChangeset for help on using the changeset viewer.

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