Changeset 40388 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.cpp
- Timestamp:
- Mar 7, 2012 12:44:46 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 76694
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.cpp
r40125 r40388 3130 3130 if (RT_SUCCESS(rc)) 3131 3131 { 3132 rc = VbglR3Init();3133 AssertRC(rc);3134 if (RT_SUCCESS(rc))3132 // rc = VbglR3Init(); 3133 // AssertRC(rc); 3134 // if (RT_SUCCESS(rc)) 3135 3135 { 3136 3136 HRESULT hr = vboxDispCmInit(); … … 3146 3146 } 3147 3147 } 3148 VbglR3Term();3148 // VbglR3Term(); 3149 3149 } 3150 3150 } … … 3169 3169 if (hr == S_OK) 3170 3170 { 3171 VbglR3Term();3171 // VbglR3Term(); 3172 3172 /// @todo RTR3Term(); 3173 3173 return TRUE; … … 5672 5672 for (UINT i = 0; i < pRc->cAllocations; ++i) 5673 5673 { 5674 BOOL fSetD ontDelete = FALSE;5674 BOOL fSetDelete = FALSE; 5675 5675 PVBOXWDDMDISP_ALLOCATION pAlloc = &pRc->aAllocations[i]; 5676 5676 if (pAlloc->hSharedHandle) 5677 5677 { 5678 /* using one and the same shared resource by different clients could lead to the situation where one client can still refer to the resource 5679 * while another one has deleted it 5680 * this could lead to gl state corruption on both host and guest side. 5681 * This is why we take extra care to avoid it. 5682 * Until we do a vboxWddmShRcRefAlloc call below the resource is guarantied to be present, however it can be removed any time after the call 5683 * if cShRcRefs is non-zero, i.e. the current cliet is not the one deleting it. 5684 * We first explicitely say to wine that resource must NOT be accessed any more and that all references to it should be cleaned */ 5685 pAdapter->D3D.pfnVBoxWineExD3DRc9SetShRcState((IDirect3DResource9*)pAlloc->pD3DIf, VBOXWINEEX_SHRC_STATE_GL_DISABLE); 5686 5678 5687 DWORD cShRcRefs; 5679 5688 HRESULT tmpHr = vboxWddmShRcRefAlloc(pDevice, pAlloc, FALSE, &cShRcRefs); 5680 if (cShRcRefs) 5681 { 5682 fSetDontDelete = TRUE; 5689 if (!cShRcRefs) 5690 { 5691 /* the current client IS the one deleting this resource */ 5692 fSetDelete = TRUE; 5683 5693 } 5684 5694 #ifdef DEBUG_misha … … 5692 5702 } 5693 5703 5694 if (fSetD ontDelete)5704 if (fSetDelete) 5695 5705 { 5696 5706 Assert(pAlloc->pD3DIf); 5697 pAdapter->D3D.pfnVBoxWineExD3DRc9Set DontDeleteGl((IDirect3DResource9*)pAlloc->pD3DIf);5707 pAdapter->D3D.pfnVBoxWineExD3DRc9SetShRcState((IDirect3DResource9*)pAlloc->pD3DIf, VBOXWINEEX_SHRC_STATE_GL_DELETE); 5698 5708 } 5699 5709
Note:
See TracChangeset
for help on using the changeset viewer.