VirtualBox

Changeset 46966 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Jul 4, 2013 6:08:11 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
86974
Message:

wddm/crOpenGL: some bugfixes, more TexPresent fixes

Location:
trunk/src/VBox/Additions/common/crOpenGL
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/defs.py

    r46227 r46966  
    498498VBoxCreateContext
    499499VBoxGetWindowId
     500VBoxGetContextId
    500501VBoxFlushToHost"""
    501502#print "DllMain"
  • trunk/src/VBox/Additions/common/crOpenGL/defs64.py

    r46227 r46966  
    479479VBoxCreateContext
    480480VBoxGetWindowId
     481VBoxGetContextId
    481482VBoxFlushToHost"""
    482483#print "DllMain"
  • trunk/src/VBox/Additions/common/crOpenGL/wgl.c

    r45484 r46966  
    329329DECLEXPORT(GLint) WINAPI VBoxGetWindowId( HDC hdc )
    330330{
    331     WindowInfo *window = stubGetWindowInfo(hdc);
     331    WindowInfo *window;
     332    GLint winid = 0;
     333
     334    CR_DDI_PROLOGUE();
     335
     336    crHashtableLock(stub.windowTable);
     337
     338    window = stubGetWindowInfo(hdc);
    332339    if (!window)
    333340    {
    334         CRASSERT(0);
    335341        crWarning("stubGetWindowInfo: window not found!");
    336         return 0;
     342        goto end;
    337343    }
    338344    if (!window->spuWindow)
    339345    {
    340         CRASSERT(0);
    341346        crWarning("stubGetWindowInfo: window is null!");
    342         return 0;
    343     }
    344     return window->spuWindow;
    345 }
     347        goto end;
     348    }
     349
     350    winid = window->spuWindow;
     351
     352end:
     353    crHashtableUnlock(stub.windowTable);
     354    return winid;
     355}
     356
     357DECLEXPORT(GLint) WINAPI VBoxGetContextId( HGLRC hglrc )
     358{
     359    ContextInfo *context;
     360    GLint ctxid = 0;
     361
     362    CR_DDI_PROLOGUE();
     363
     364//    crHashtableLock(stub.windowTable);
     365    crHashtableLock(stub.contextTable);
     366
     367    context = (ContextInfo *) crHashtableSearch(stub.contextTable, (unsigned long) hglrc);
     368    if (!context)
     369    {
     370        crWarning("crHashtableSearch: context not found!");
     371        goto end;
     372    }
     373
     374    if (context->type != CHROMIUM)
     375    {
     376        crWarning("unexpected context type %d", context->type);
     377        goto end;
     378    }
     379
     380    if (context->spuContext <= 0)
     381    {
     382        crWarning("no spuSontext defined");
     383        goto end;
     384    }
     385
     386    ctxid = context->spuContext;
     387
     388end:
     389    crHashtableUnlock(stub.contextTable);
     390    return ctxid;
     391}
     392
    346393
    347394DECLEXPORT(HGLRC) WINAPI wglCreateContext_prox( HDC hdc )
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