Changeset 47070 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Jul 10, 2013 11:39:19 AM (12 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/common/VBoxVideoLog.h
r44529 r47070 104 104 BP_WARN(); \ 105 105 } while (0) 106 106 107 #define ASSERT_WARN(_a, _w) do {\ 107 108 if(!(_a)) { \ … … 117 118 STOP_FATAL(); \ 118 119 } while (0) 120 121 #define _DBGOP_N_TIMES(_count, _op) do { \ 122 static int fDoWarnCount = (_count); \ 123 if (fDoWarnCount) { \ 124 --fDoWarnCount; \ 125 _op; \ 126 } \ 127 } while (0) 128 129 #define WARN_ONCE(_a) do { \ 130 _DBGOP_N_TIMES(1, WARN(_a)); \ 131 } while (0) 132 119 133 120 134 #define LOG(_a) _LOGMSG(VBOX_VIDEO_LOG_LOGGER, "", _a) -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPDevExt.h
r46885 r47070 115 115 volatile BOOLEAN fRenderToShadowDisabled; 116 116 117 BOOLEAN f3DEnabled; 117 118 BOOLEAN fTexPresentEnabled; 118 119 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPCr.cpp
r47049 r47070 26 26 27 27 static uint32_t g_VBoxMpCrHostCaps = 0; 28 static uint32_t g_VBoxMpCr3DSupported = 0; 28 29 29 30 uint32_t VBoxMpCrGetHostCaps() 30 31 { 31 32 return g_VBoxMpCrHostCaps; 33 } 34 35 bool VBoxMpCrCtlConIs3DSupported() 36 { 37 return !!g_VBoxMpCr3DSupported; 32 38 } 33 39 … … 863 869 } 864 870 865 bool VBoxMpCrCtlConIs3DSupported() 866 { 871 void VBoxMpCrCtlConInit() 872 { 873 g_VBoxMpCr3DSupported = 0; 874 g_VBoxMpCrHostCaps = 0; 875 867 876 #ifdef VBOX_WITH_CROGL 868 877 VBOXMP_CRCTLCON CrCtlCon = {0}; … … 872 881 { 873 882 LOGREL(("VBoxMpCrCtlConConnect failed with rc(%d), 3D not supported!")); 874 return false; 875 } 883 return; 884 } 885 886 g_VBoxMpCr3DSupported = 1; 876 887 877 888 rc = vboxMpCrCtlConGetCaps(&CrCtlCon, u32ClientID, &g_VBoxMpCrHostCaps); … … 890 901 if (RT_FAILURE(rc)) 891 902 WARN(("VBoxMpCrCtlConDisconnect failed rc (%d), ignoring..", rc)); 892 893 return true;894 903 #else 895 return false;896 904 #endif 897 905 } -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPCr.h
r46783 r47070 28 28 } VBOXMP_CRCTLCON, *PVBOXMP_CRCTLCON; 29 29 30 void VBoxMpCrCtlConInit(); 31 30 32 bool VBoxMpCrCtlConIs3DSupported(); 31 33 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVdma.cpp
r47063 r47070 971 971 if (!pDevExt->u32CrConDefaultClientID) 972 972 { 973 if (!pDevExt->f3DEnabled) 974 { 975 WARN(("3D disabled, should not be here!")); 976 return STATUS_UNSUCCESSFUL; 977 } 978 973 979 int rc = VBoxMpCrCtlConConnect(&pDevExt->CrCtlCon, CR_PROTOCOL_VERSION_MAJOR, CR_PROTOCOL_VERSION_MINOR, &pDevExt->u32CrConDefaultClientID); 974 980 if (!RT_SUCCESS(rc)) -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r47063 r47070 281 281 if (NT_SUCCESS(Status)) 282 282 { 283 Status = vboxVdmaTexPresentSetAlloc(pDevExt, pAllocData); 284 if (NT_SUCCESS(Status)) 285 return STATUS_SUCCESS; 286 else 287 WARN(("vboxVdmaTexPresentSetAlloc failed, Status 0x%x", Status)); 283 if (pDevExt->f3DEnabled) 284 { 285 Status = vboxVdmaTexPresentSetAlloc(pDevExt, pAllocData); 286 if (NT_SUCCESS(Status)) 287 return STATUS_SUCCESS; 288 else 289 WARN(("vboxVdmaTexPresentSetAlloc failed, Status 0x%x", Status)); 290 } 288 291 } 289 292 else … … 1172 1175 VBoxMpCrShgsmiTransportCreate(&pDevExt->CrHgsmiTransport, pDevExt); 1173 1176 1174 pDevExt->fTexPresentEnabled = !!(VBoxMpCrGetHostCaps() & CR_VBOX_CAP_TEX_PRESENT); 1175 Assert(!pDevExt->fTexPresentEnabled); 1177 pDevExt->f3DEnabled = VBoxMpCrCtlConIs3DSupported(); 1178 1179 if (pDevExt->f3DEnabled) 1180 { 1181 pDevExt->fTexPresentEnabled = !!(VBoxMpCrGetHostCaps() & CR_VBOX_CAP_TEX_PRESENT); 1182 Assert(!pDevExt->fTexPresentEnabled); 1183 } 1184 else 1185 pDevExt->fTexPresentEnabled = FALSE; 1176 1186 1177 1187 for (UINT i = 0; i < (UINT)VBoxCommonFromDeviceExt(pDevExt)->cDisplays; ++i) … … 5971 5981 } 5972 5982 5973 int rc = VBoxMpCrCtlConConnect(&pDevExt->CrCtlCon, CR_PROTOCOL_VERSION_MAJOR, CR_PROTOCOL_VERSION_MINOR, &pContext->u32CrConClientID); 5974 if (RT_SUCCESS(rc)) 5983 if (!VBOXWDDM_IS_DISPLAYONLY() && pDevExt->f3DEnabled) 5975 5984 { 5976 5985 VBoxMpCrPackerInit(&pContext->CrPacker); 5977 }5978 else5979 {5980 WARN(("VBoxMpCrCtlConConnect failed rc (%d)", rc));5981 Status = STATUS_UNSUCCESSFUL; 5982 }5986 int rc = VBoxMpCrCtlConConnect(&pDevExt->CrCtlCon, CR_PROTOCOL_VERSION_MAJOR, CR_PROTOCOL_VERSION_MINOR, &pContext->u32CrConClientID); 5987 if (!RT_SUCCESS(rc)) 5988 WARN(("VBoxMpCrCtlConConnect failed rc (%d), ignoring for system context", rc)); 5989 } 5990 5991 Status = STATUS_SUCCESS; 5983 5992 } 5984 5993 else … … 6009 6018 if (pInfo->crVersionMajor || pInfo->crVersionMinor) 6010 6019 { 6011 int rc = VBoxMpCrCtlConConnect(&pDevExt->CrCtlCon, 6012 pInfo->crVersionMajor, pInfo->crVersionMinor, 6013 &pContext->u32CrConClientID); 6014 if (RT_SUCCESS(rc)) 6020 if (pDevExt->f3DEnabled) 6015 6021 { 6016 VBoxMpCrPackerInit(&pContext->CrPacker); 6022 int rc = VBoxMpCrCtlConConnect(&pDevExt->CrCtlCon, 6023 pInfo->crVersionMajor, pInfo->crVersionMinor, 6024 &pContext->u32CrConClientID); 6025 if (RT_SUCCESS(rc)) 6026 { 6027 VBoxMpCrPackerInit(&pContext->CrPacker); 6028 } 6029 else 6030 { 6031 WARN(("VBoxMpCrCtlConConnect failed rc (%d)", rc)); 6032 Status = STATUS_UNSUCCESSFUL; 6033 } 6017 6034 } 6018 6035 else 6019 6036 { 6020 WARN(("VBoxMpCrCtlConConnect failed rc (%d)", rc));6037 LOG(("3D Not Enabled, failing 3D context creation")); 6021 6038 Status = STATUS_UNSUCCESSFUL; 6022 6039 } … … 6046 6063 if (pInfo->crVersionMajor || pInfo->crVersionMinor) 6047 6064 { 6048 int rc = VBoxMpCrCtlConConnect(&pDevExt->CrCtlCon, 6049 pInfo->crVersionMajor, pInfo->crVersionMinor, 6050 &pContext->u32CrConClientID); 6051 if (!RT_SUCCESS(rc)) 6065 if (pDevExt->f3DEnabled) 6052 6066 { 6053 WARN(("VBoxMpCrCtlConConnect failed rc (%d)", rc)); 6067 int rc = VBoxMpCrCtlConConnect(&pDevExt->CrCtlCon, 6068 pInfo->crVersionMajor, pInfo->crVersionMinor, 6069 &pContext->u32CrConClientID); 6070 if (!RT_SUCCESS(rc)) 6071 { 6072 WARN(("VBoxMpCrCtlConConnect failed rc (%d)", rc)); 6073 Status = STATUS_UNSUCCESSFUL; 6074 } 6075 } 6076 else 6077 { 6078 LOG(("3D Not Enabled, failing 3D (hgsmi) context creation")); 6054 6079 Status = STATUS_UNSUCCESSFUL; 6055 6080 } … … 6619 6644 Status = STATUS_SUCCESS; 6620 6645 6646 VBoxMpCrCtlConInit(); 6647 6621 6648 /* always need to do the check to request host caps */ 6622 6649 LOG(("Doing the 3D check.."));
Note:
See TracChangeset
for help on using the changeset viewer.