Changeset 71511 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Mar 26, 2018 1:14:10 PM (7 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPDevExt.h
r71196 r71511 33 33 extern DWORD g_VBoxDisplayOnly; 34 34 # include "wddm/VBoxMPTypes.h" 35 #endif 36 37 typedef enum VBOX_HWTYPE 38 { 39 VBOX_HWTYPE_CROGL = 0, 40 VBOX_HWTYPE_VMSVGA = 1 41 } VBOX_HWTYPE; 42 43 #ifdef VBOX_WDDM_MINIPORT 44 typedef struct VBOXWDDM_HWRESOURCES 45 { 46 PHYSICAL_ADDRESS phVRAM; 47 ULONG cbVRAM; 48 ULONG ulApertureSize; 49 } VBOXWDDM_HWRESOURCES, *PVBOXWDDM_HWRESOURCES; 35 50 #endif 36 51 … … 202 217 203 218 HGSMIAREA areaDisplay; /* Entire VRAM chunk for this display device. */ 219 220 VBOX_HWTYPE enmHwType; 221 #ifdef VBOX_WDDM_MINIPORT 222 VBOXWDDM_HWRESOURCES HwResources; 223 #endif 224 204 225 } VBOXMP_DEVEXT, *PVBOXMP_DEVEXT; 205 226 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r71196 r71511 725 725 return VBOXWDDM_HGSMICMD_TYPE_UNDEFINED; 726 726 } 727 728 typedef struct VBOXWDDM_HWRESOURCES729 {730 PHYSICAL_ADDRESS phVRAM;731 ULONG cbVRAM;732 ULONG ulApertureSize;733 } VBOXWDDM_HWRESOURCES, *PVBOXWDDM_HWRESOURCES;734 727 735 728 NTSTATUS vboxWddmPickResources(PVBOXMP_DEVEXT pDevExt, PDXGK_DEVICE_INFO pDeviceInfo, PVBOXWDDM_HWRESOURCES pHwResources) … … 820 813 821 814 VBoxVidPnTargetsInit(pDevExt->aTargets, RT_ELEMENTS(pDevExt->aTargets), 0); 815 816 uint32_t u32 = 0; 817 if (VBoxVGACfgAvailable()) 818 { 819 VBoxVGACfgQuery(VBE_DISPI_CFG_ID_VMSVGA, &u32, 0); 820 } 821 pDevExt->enmHwType = u32 ? VBOX_HWTYPE_VMSVGA : VBOX_HWTYPE_CROGL; 822 822 } 823 823 … … 1139 1139 if (Status == STATUS_SUCCESS) 1140 1140 { 1141 VBOXWDDM_HWRESOURCES HwRc; 1142 Status = vboxWddmPickResources(pDevExt, &DeviceInfo, &HwRc); 1141 Status = vboxWddmPickResources(pDevExt, &DeviceInfo, &pDevExt->HwResources); 1143 1142 if (Status == STATUS_SUCCESS) 1144 1143 { … … 1169 1168 */ 1170 1169 VBoxSetupDisplaysHGSMI(VBoxCommonFromDeviceExt(pDevExt), 1171 HwRc.phVRAM, HwRc.ulApertureSize, HwRc.cbVRAM,1170 pDevExt->HwResources.phVRAM, pDevExt->HwResources.ulApertureSize, pDevExt->HwResources.cbVRAM, 1172 1171 VBVACAPS_COMPLETEGCMD_BY_IOREAD | VBVACAPS_IRQ); 1173 1172 if (VBoxCommonFromDeviceExt(pDevExt)->bHGSMI) … … 7595 7594 if (RT_SUCCESS(rc)) 7596 7595 { 7596 /* Check whether 3D is required by the guest. */ 7597 7597 if (major > 6) 7598 7598 { … … 7620 7620 LOG(("3D is %srequired!", f3DRequired? "": "NOT ")); 7621 7621 7622 Status = STATUS_SUCCESS; 7622 /* Check whether 3D is provided by the host. */ 7623 VBOX_HWTYPE enmHwType = VBOX_HWTYPE_CROGL; 7624 BOOL f3DSupported = FALSE; 7625 7626 if (VBoxVGACfgAvailable()) 7627 { 7628 /* New configuration query interface is available. */ 7629 uint32_t u32; 7630 if (VBoxVGACfgQuery(VBE_DISPI_CFG_ID_VERSION, &u32, 0)) 7631 { 7632 LOGREL(("VGA configuration version %d", u32)); 7633 } 7634 7635 VBoxVGACfgQuery(VBE_DISPI_CFG_ID_3D, &u32, 0); 7636 f3DSupported = RT_BOOL(u32); 7637 7638 VBoxVGACfgQuery(VBE_DISPI_CFG_ID_VMSVGA, &u32, 0); 7639 if (u32) 7640 { 7641 enmHwType = VBOX_HWTYPE_VMSVGA; 7642 } 7643 } 7644 7645 BOOL fCmdVbva = FALSE; 7646 if (enmHwType == VBOX_HWTYPE_CROGL) 7647 { 7648 /* Try to establish connection to the host 3D service. */ 7623 7649 #ifdef VBOX_WITH_CROGL 7624 VBoxMpCrCtlConInit(); 7625 7626 /* always need to do the check to request host caps */ 7627 LOG(("Doing the 3D check..")); 7628 if (!VBoxMpCrCtlConIs3DSupported()) 7629 #endif 7630 { 7631 /* No 3D support by the host. */ 7632 if (VBoxQueryWinVersion() >= WINVERSION_8) 7633 { 7634 /* Use display only driver for Win8+. */ 7635 g_VBoxDisplayOnly = 1; 7636 7637 /* Black list some builds. */ 7638 if (major == 6 && minor == 4 && build == 9841) 7639 { 7640 /* W10 Technical preview crashes with display-only driver. */ 7641 LOGREL(("3D is NOT supported by the host, fallback to the system video driver.")); 7642 Status = STATUS_UNSUCCESSFUL; 7650 VBoxMpCrCtlConInit(); 7651 7652 /* always need to do the check to request host caps */ 7653 LOG(("Doing the 3D check..")); 7654 f3DSupported = VBoxMpCrCtlConIs3DSupported(); 7655 7656 fCmdVbva = RT_BOOL(VBoxMpCrGetHostCaps() & CR_VBOX_CAP_CMDVBVA); 7657 #endif 7658 } 7659 else if (enmHwType == VBOX_HWTYPE_VMSVGA) 7660 { 7661 fCmdVbva = TRUE; 7662 } 7663 else 7664 { 7665 Status = STATUS_UNSUCCESSFUL; 7666 } 7667 7668 LOGREL(("WDDM: 3D is %ssupported, hardware type %d", f3DSupported? "": "not ", enmHwType)); 7669 7670 if (NT_SUCCESS(Status)) 7671 { 7672 if (!f3DSupported) 7673 { 7674 /* No 3D support by the host. */ 7675 if (VBoxQueryWinVersion() >= WINVERSION_8) 7676 { 7677 /* Use display only driver for Win8+. */ 7678 g_VBoxDisplayOnly = 1; 7679 7680 /* Black list some builds. */ 7681 if (major == 6 && minor == 4 && build == 9841) 7682 { 7683 /* W10 Technical preview crashes with display-only driver. */ 7684 LOGREL(("3D is NOT supported by the host, fallback to the system video driver.")); 7685 Status = STATUS_UNSUCCESSFUL; 7686 } 7687 else 7688 { 7689 LOGREL(("3D is NOT supported by the host, falling back to display-only mode..")); 7690 } 7643 7691 } 7644 7692 else 7645 7693 { 7646 LOGREL(("3D is NOT supported by the host, falling back to display-only mode..")); 7647 } 7648 } 7649 else 7650 { 7651 if (f3DRequired) 7652 { 7653 LOGREL(("3D is NOT supported by the host, but is required for the current guest version using this driver..")); 7654 Status = STATUS_UNSUCCESSFUL; 7655 } 7656 else 7657 LOGREL(("3D is NOT supported by the host, but is NOT required for the current guest version using this driver, continuing with Disabled 3D..")); 7694 if (f3DRequired) 7695 { 7696 LOGREL(("3D is NOT supported by the host, but is required for the current guest version using this driver..")); 7697 Status = STATUS_UNSUCCESSFUL; 7698 } 7699 else 7700 LOGREL(("3D is NOT supported by the host, but is NOT required for the current guest version using this driver, continuing with Disabled 3D..")); 7701 } 7658 7702 } 7659 7703 } … … 7672 7716 else 7673 7717 { 7674 Status = vboxWddmInitFullGraphicsDriver(DriverObject, RegistryPath, 7675 #ifdef VBOX_WITH_CROGL 7676 !!(VBoxMpCrGetHostCaps() & CR_VBOX_CAP_CMDVBVA) 7677 #else 7678 FALSE 7679 #endif 7680 ); 7718 Status = vboxWddmInitFullGraphicsDriver(DriverObject, RegistryPath, fCmdVbva); 7681 7719 } 7682 7720 7683 7721 if (NT_SUCCESS(Status)) 7722 { 7723 /* 7724 * Successfully initialized the driver. 7725 */ 7684 7726 return Status; 7727 } 7728 7729 /* 7730 * Cleanup on failure. 7731 */ 7685 7732 7686 7733 #ifdef VBOX_WITH_CROGL
Note:
See TracChangeset
for help on using the changeset viewer.