Changeset 34884 in vbox for trunk/src/VBox
- Timestamp:
- Dec 9, 2010 1:24:02 PM (14 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxCrHgsmi.cpp
r33714 r34884 138 138 } 139 139 #else 140 static int vboxCrHgsmiInitPerform(VBOXDISPKMT_CALLBACKS *pCallbacks) 141 { 142 HRESULT hr = vboxDispKmtCallbacksInit(pCallbacks); 143 Assert(hr == S_OK); 144 if (hr == S_OK) 145 { 146 /* check if we can create the hgsmi */ 147 PVBOXUHGSMI pHgsmi = VBoxCrHgsmiCreate(); 148 if (pHgsmi) 149 { 150 /* yes, we can, so this is wddm mode */ 151 VBoxCrHgsmiDestroy(pHgsmi); 152 Log(("CrHgsmi: WDDM mode supported\n")); 153 return 1; 154 } 155 vboxDispKmtCallbacksTerm(pCallbacks); 156 } 157 Log(("CrHgsmi: unsupported\n")); 158 return -1; 159 } 160 140 161 VBOXCRHGSMI_DECL(int) VBoxCrHgsmiInit() 141 162 { 142 163 if (!g_bVBoxKmtCallbacksInited) 143 164 { 144 HRESULT hr = vboxDispKmtCallbacksInit(&g_VBoxCrHgsmiKmtCallbacks); 145 Assert(hr == S_OK); 146 if (hr == S_OK) 147 g_bVBoxKmtCallbacksInited = 1; 148 else 149 g_bVBoxKmtCallbacksInited = -1; 150 } 151 152 Assert(g_bVBoxKmtCallbacksInited); 153 if (g_bVBoxKmtCallbacksInited < 0) 154 { 155 Assert(0); 156 return VERR_NOT_SUPPORTED; 157 } 158 159 return VINF_SUCCESS; 165 g_bVBoxKmtCallbacksInited = vboxCrHgsmiInitPerform(&g_VBoxCrHgsmiKmtCallbacks); 166 Assert(g_bVBoxKmtCallbacksInited); 167 } 168 169 return g_bVBoxKmtCallbacksInited > 0 ? VINF_SUCCESS : VERR_NOT_SUPPORTED; 160 170 } 161 171 … … 170 180 HRESULT hr = vboxUhgsmiKmtEscCreate(pHgsmiGL, TRUE /* bD3D tmp for injection thread*/); 171 181 #endif 172 Assert(hr == S_OK);182 Log(("CrHgsmi: faled to create KmtEsc UHGSMI instance, hr (0x%x)\n", hr)); 173 183 if (hr == S_OK) 174 184 { -
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxUhgsmiKmt.cpp
r34345 r34884 412 412 { 413 413 hr = vboxDispKmtOpenAdapter(&pHgsmi->Callbacks, &pHgsmi->Adapter); 414 #ifdef DEBUG_misha 415 /* may fail with xpdm driver */ 414 416 Assert(hr == S_OK); 417 #endif 415 418 if (hr == S_OK) 416 419 { … … 625 628 { 626 629 NTSTATUS Status = pCallbacks->pfnD3DKMTOpenAdapterFromHdc(&OpenAdapterData); 630 #ifdef DEBUG_misha 631 /* may fail with xpdm driver */ 627 632 Assert(!Status); 633 #endif 628 634 if (!Status) 629 635 { -
trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
r34571 r34884 1612 1612 rc = VBoxCrHgsmiInit(&Callbacks); 1613 1613 #endif 1614 AssertRC(rc);1615 1614 if (RT_SUCCESS(rc)) 1616 1615 bHasHGSMI = 1; 1617 1616 else 1618 1617 bHasHGSMI = 0; 1619 } 1620 1621 Assert(bHasHGSMI); 1618 1619 crDebug("CrHgsmi is %s", bHasHGSMI ? "ENABLED" : "DISABLED"); 1620 } 1621 1622 Assert(bHasHGSMI >= 0); 1622 1623 1623 1624 return bHasHGSMI;
Note:
See TracChangeset
for help on using the changeset viewer.