VirtualBox

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


Ignore:
Timestamp:
May 12, 2015 12:51:48 PM (10 years ago)
Author:
vboxsync
Message:

3D: Additions: provide Windows ICD driver with HGSMI connection.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/Makefile.kmk

    r52038 r55825  
    207207        $(VBOX_LIB_OGL_CRUTIL) \
    208208        $(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB)
     209
     210VBoxOGL_LIBS.win += \
     211        $(PATH_STAGE_LIB)/additions/VBoxDispMpLogger$(VBOX_SUFF_LIB) \
     212        $(PATH_STAGE_LIB)/additions/VBoxCrHgsmi$(VBOX_SUFF_LIB)
     213
    209214if1of ($(KBUILD_TARGET), linux solaris freebsd)
    210215 VBoxOGL_LIBS += \
     
    242247        $(VBOX_LIB_OGL_CRUTIL_X86) \
    243248        $(PATH_STAGE_LIB)/additions/VBoxOGLspuload-x86$(VBOX_SUFF_LIB)
     249
     250VBoxOGL-x86_LIBS.win += \
     251        $(PATH_STAGE_LIB)/additions/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \
     252        $(PATH_STAGE_LIB)/additions/VBoxCrHgsmi-x86$(VBOX_SUFF_LIB)
     253
     254
    244255VBoxOGL-x86_SOURCES.win = $(subst cropengl.def,cropengl-x86.def,$(VBoxOGL_SOURCES.win))
    245256VBoxOGL-x86_CLEAN.win = $(subst cropengl.def,cropengl-x86.def,$(VBoxOGL_CLEAN.win))
  • trunk/src/VBox/Additions/common/crOpenGL/icd_drv.c

    r55620 r55825  
    2222#include "stub.h"
    2323#include "cr_mem.h"
     24
     25#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
     26# include <VBox/VBoxCrHgsmi.h>
     27# include <VBox/VBoxUhgsmi.h>
     28#endif
    2429
    2530#include <windows.h>
     
    155160    char dpyName[MAX_DPY_NAME];
    156161    ContextInfo *context;
     162#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
     163    PVBOXUHGSMI pHgsmi = NULL;
     164#endif
    157165
    158166    CR_DDI_PROLOGUE();
     
    170178#endif
    171179
     180#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
     181    pHgsmi = VBoxCrHgsmiCreate();
     182#endif
     183
    172184    context = stubNewContext(dpyName, desiredVisual, UNDECIDED, 0
    173185#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
    174         , NULL
     186        , pHgsmi
    175187#endif
    176188            );
     
    301313BOOL APIENTRY DrvDeleteContext(HGLRC hglrc)
    302314{
    303     CR_DDI_PROLOGUE();
    304     /*crDebug( "DrvDeleteContext(0x%x) called", hglrc );*/
     315#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
     316    ContextInfo *pContext;
     317    PVBOXUHGSMI pHgsmi = NULL;
     318#endif
     319
     320    CR_DDI_PROLOGUE();
     321    crDebug( "DrvDeleteContext(0x%x) called", hglrc );
     322
     323#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
     324    crHashtableLock(stub.contextTable);
     325
     326    pContext = (ContextInfo *) crHashtableSearch(stub.contextTable, (unsigned long) hglrc);
     327    if (pContext)
     328        pHgsmi = pContext->pHgsmi;
     329
     330    crHashtableUnlock(stub.contextTable);
     331#endif
     332
    305333    stubDestroyContext( (unsigned long) hglrc );
    306     return 1;
     334
     335#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
     336    if (pHgsmi)
     337        VBoxCrHgsmiDestroy(pHgsmi);
     338#endif
     339
     340    return true;
    307341}
    308342
  • trunk/src/VBox/Additions/common/crOpenGL/load.c

    r52552 r55825  
    14601460        }
    14611461
     1462#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
     1463        VBoxCrHgsmiInit();
     1464#endif
    14621465        break;
    14631466    }
     
    14741477        }
    14751478
     1479       
     1480#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
     1481        VBoxCrHgsmiTerm();
     1482#endif
     1483
    14761484        stubSPUSafeTearDown();
    14771485
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