Changeset 29798 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
- Timestamp:
- May 25, 2010 5:26:57 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
r29742 r29798 595 595 } 596 596 597 static void vboxWddmDevExtZeroinit(PDEVICE_EXTENSION pDevExt, CONST PDEVICE_OBJECT pPDO) 598 { 599 memset(pDevExt, 0, sizeof (DEVICE_EXTENSION)); 600 pDevExt->pPDO = pPDO; 601 #ifdef VBOXWDDM_RENDER_FROM_SHADOW 602 for (int i = 0; i < RT_ELEMENTS(pDevExt->aSources); ++i) 603 { 604 pDevExt->aSources[i].offVram = VBOXVIDEOOFFSET_VOID; 605 } 606 #endif 607 } 608 597 609 /* driver callbacks */ 598 610 NTSTATUS DxgkDdiAddDevice( … … 613 625 if (pContext) 614 626 { 615 pContext->pPDO = PhysicalDeviceObject;627 vboxWddmDevExtZeroinit(pContext, PhysicalDeviceObject); 616 628 *MiniportDeviceContext = pContext; 617 #ifdef VBOXWDDM_RENDER_FROM_SHADOW618 for (int i = 0; i < RT_ELEMENTS(pContext->aSources); ++i)619 {620 pContext->aSources[i].offVram = VBOXVIDEOOFFSET_VOID;621 }622 #endif623 629 } 624 630 else … … 694 700 { 695 701 drprintf(("VBoxVideoWddm: HGSMI failed to initialize, returning err\n")); 702 703 VbglTerminate(); 696 704 /* @todo: report a better status */ 697 705 Status = STATUS_UNSUCCESSFUL; … … 729 737 dfprintf(("==> "__FUNCTION__ ", context(0x%p)\n", MiniportDeviceContext)); 730 738 731 AssertBreakpoint(); 732 /* @todo: fixme: implement */ 733 734 dfprintf(("<== "__FUNCTION__ ", context(0x%p)\n", MiniportDeviceContext)); 735 736 return STATUS_SUCCESS; 739 vboxVDbgBreakF(); 740 741 PDEVICE_EXTENSION pDevExt = (PDEVICE_EXTENSION)MiniportDeviceContext; 742 NTSTATUS Status = STATUS_SUCCESS; 743 744 /* do everything we did on DxgkDdiStartDevice in the reverse order */ 745 #ifdef VBOX_WITH_VIDEOHWACCEL 746 vboxVHWAFree(pDevExt); 747 #endif 748 749 int rc = VBoxFreeDisplaysHGSMI(pDevExt); 750 AssertRC(rc); 751 if (RT_SUCCESS(rc)) 752 { 753 VbglTerminate(); 754 755 /* revert back to the state we were right after the DxgkDdiAddDevice */ 756 vboxWddmDevExtZeroinit(pDevExt, pDevExt->pPDO); 757 } 758 else 759 Status = STATUS_UNSUCCESSFUL; 760 761 return Status; 737 762 } 738 763
Note:
See TracChangeset
for help on using the changeset viewer.