VirtualBox

Changeset 43487 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Oct 1, 2012 11:53:15 AM (12 years ago)
Author:
vboxsync
Message:

crOpenGL/wddm: basics for miniport-based visible rects processing (guest part); export flushToHost command

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

Legend:

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

    r42520 r43487  
    108108}
    109109
     110void stubConFlush(GLint con)
     111{
     112    if (con)
     113        stub.spu->dispatch_table.VBoxConFlush(con);
     114    else
     115        crError("stubConFlush called with null connection");
     116}
     117
    110118static void stubWindowCleanupForContextsCB(unsigned long key, void *data1, void *data2)
    111119{
     
    190198    if (stub.bRunningUnderWDDM)
    191199    {
    192         crError("Should not be here: WindowCreate/Destroy & VBoxPackGetInjectID recuire connection id!");
     200        crError("Should not be here: WindowCreate/Destroy & VBoxPackGetInjectID require connection id!");
    193201        winInfo->mapped = 0;
    194202    }
  • trunk/src/VBox/Additions/common/crOpenGL/defs.py

    r42499 r43487  
    496496crSwapBuffers
    497497crGetProcAddress
    498 VBoxCreateContext"""
     498VBoxCreateContext
     499VBoxGetWindowId
     500VBoxFlushToHost"""
    499501#print "DllMain"
  • trunk/src/VBox/Additions/common/crOpenGL/defs64.py

    r42499 r43487  
    477477crSwapBuffers
    478478crGetProcAddress
    479 VBoxCreateContext"""
     479VBoxCreateContext
     480VBoxGetWindowId
     481VBoxFlushToHost"""
    480482#print "DllMain"
  • trunk/src/VBox/Additions/common/crOpenGL/load.c

    r42536 r43487  
    974974    }
    975975}
    976 # endif
     976# endif /* VBOX_WITH_WDDM */
    977977
    978978static void stubSyncTrCheckWindowsCB(unsigned long key, void *data1, void *data2)
     
    10541054                    stub.trackWindowVisibleRgn = 0;
    10551055                    stub.bRunningUnderWDDM = true;
     1056#ifdef VBOX_WDDM_MINIPORT_WITH_VISIBLE_RECTS
     1057                    crError("should not be here, visible rects should be processed in miniport!");
     1058#endif
    10561059                }
    10571060            }
     
    11641167    return 0;
    11651168}
    1166 #endif
     1169#endif /* CR_NEWWINTRACK */
    11671170
    11681171/**
     
    12041207        disable_sync = 1;
    12051208    }
     1209#elif defined(WINDOWS) && defined(VBOX_WITH_WDDM) && defined(VBOX_WDDM_MINIPORT_WITH_VISIBLE_RECTS)
     1210    if (GetModuleHandle(VBOX_MODNAME_DISPD3D))
     1211    {
     1212        disable_sync = 1;
     1213        crDebug("running with " VBOX_MODNAME_DISPD3D);
     1214        stub.trackWindowVisibleRgn = 0;
     1215        stub.bRunningUnderWDDM = true;
     1216    }
    12061217#endif
    12071218
     
    13671378#ifdef VDBG_VEHANDLER
    13681379static PVOID g_VBoxWDbgVEHandler = NULL;
     1380static DWORD g_VBoxWDbgVEHExit = 1;
    13691381LONG WINAPI vboxVDbgVectoredHandler(struct _EXCEPTION_POINTERS *pExceptionInfo)
    13701382{
     
    13821394        case EXCEPTION_ILLEGAL_INSTRUCTION:
    13831395            CRASSERT(0);
     1396            if (g_VBoxWDbgVEHExit)
     1397                exit(1);
    13841398            break;
    13851399        default:
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c

    r42591 r43487  
    131131    CRASSERT(thread->packer);
    132132    packspuFlush((void *) thread);
     133#else
     134    crError("VBoxConFlush not implemented!");
    133135#endif
    134136}
  • trunk/src/VBox/Additions/common/crOpenGL/stub.h

    r42518 r43487  
    355355
    356356extern void stubForcedFlush(GLint con);
     357extern void stubConFlush(GLint con);
    357358extern void APIENTRY stub_GetChromiumParametervCR( GLenum target, GLuint index, GLenum type, GLsizei count, GLvoid *values );
    358359
  • trunk/src/VBox/Additions/common/crOpenGL/wgl.c

    r42499 r43487  
    325325}
    326326
     327GLint WINAPI VBoxGetWindowId( HDC hdc )
     328{
     329    WindowInfo *window = stubGetWindowInfo(hdc);
     330    if (!window)
     331    {
     332        CRASSERT(0);
     333        crWarning("stubGetWindowInfo: window not found!");
     334        return 0;
     335    }
     336    if (!window->spuWindow)
     337    {
     338        CRASSERT(0);
     339        crWarning("stubGetWindowInfo: window is null!");
     340        return 0;
     341    }
     342    return window->spuWindow;
     343}
     344
    327345HGLRC WINAPI wglCreateContext_prox( HDC hdc )
    328346{
    329347    return VBoxCreateContext(hdc, NULL);
     348}
     349
     350void WINAPI VBoxFlushToHost ( HGLRC hglrc )
     351{
     352    ContextInfo *context;
     353
     354    CR_DDI_PROLOGUE();
     355
     356//    crHashtableLock(stub.windowTable);
     357    crHashtableLock(stub.contextTable);
     358
     359    context = (ContextInfo *) crHashtableSearch(stub.contextTable, (unsigned long) hglrc);
     360
     361    if (context)
     362        stubConFlush(CR_CTX_CON(context));
     363
     364    crHashtableUnlock(stub.contextTable);
     365//    crHashtableUnlock(stub.windowTable);
    330366}
    331367
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