- Timestamp:
- Aug 10, 2011 3:04:33 PM (13 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp
r38144 r38405 375 375 { 376 376 VBOXWDDM_HTABLE_ITERATOR Iter; 377 bool fRestart = false;378 377 do 379 378 { 380 379 ExAcquireFastMutex(&pDevExt->ContextMutex); 381 380 vboxWddmHTableIterInit(&pContext->Swapchains, &Iter); 382 do 383 { 384 PVBOXWDDM_SWAPCHAIN pSwapchain = (PVBOXWDDM_SWAPCHAIN)vboxWddmHTableIterNext(&Iter, NULL); 385 if (!pSwapchain) 386 break; 387 388 /* yes, we can call remove locked even when using iterator */ 389 vboxWddmSwapchainCtxRemoveLocked(pDevExt, pContext, pSwapchain); 390 // vboxWddmHTableIterRemoveCur(&Iter); 391 392 ExReleaseFastMutex(&pDevExt->ContextMutex); 393 /* we must not do vboxWddmSwapchainDestroy inside a context mutex */ 394 vboxWddmSwapchainDestroy(pDevExt, pSwapchain); 395 fRestart = true; 396 } while (1); 397 } while (fRestart); 381 PVBOXWDDM_SWAPCHAIN pSwapchain = (PVBOXWDDM_SWAPCHAIN)vboxWddmHTableIterNext(&Iter, NULL); 382 if (!pSwapchain) 383 break; 384 385 /* yes, we can call remove locked even when using iterator */ 386 vboxWddmSwapchainCtxRemoveLocked(pDevExt, pContext, pSwapchain); 387 388 ExReleaseFastMutex(&pDevExt->ContextMutex); 389 /* we must not do vboxWddmSwapchainDestroy inside a context mutex */ 390 vboxWddmSwapchainDestroy(pDevExt, pSwapchain); 391 /* start from the very beginning, we will quit the loop when no swapchains left */ 392 } while (1); 393 394 /* no swapchains left, we exiteed the while loop via the "break", and we still owning the mutex */ 398 395 ExReleaseFastMutex(&pDevExt->ContextMutex); 399 396 } -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r37889 r38405 5500 5500 } 5501 5501 5502 /* first terminate the swapchain, this will also ensure 5503 * all currently pending driver->user Cm commands 5504 * (i.e. visible regions commands) are completed */ 5505 vboxWddmSwapchainCtxTerm(pDevExt, pContext); 5506 5502 5507 NTSTATUS Status = vboxVideoAMgrCtxDestroy(&pContext->AllocContext); 5503 5508 Assert(Status == STATUS_SUCCESS); … … 5508 5513 if (Status == STATUS_SUCCESS) 5509 5514 { 5510 vboxWddmSwapchainCtxTerm(pDevExt, pContext);5511 5515 vboxWddmMemFree(pContext); 5512 5516 }
Note:
See TracChangeset
for help on using the changeset viewer.