Changeset 29432 in vbox
- Timestamp:
- May 12, 2010 5:14:03 PM (15 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Display/Makefile.kmk
r28800 r29432 79 79 VBoxDispD3D_SOURCES = \ 80 80 wddm/VBoxDispD3D.cpp \ 81 wddm/VBoxDispD3DIf.cpp \ 81 82 wddm/VBoxDispD3D.def \ 82 83 wddm/VBoxDispD3D.rc … … 85 86 $(VBOX_LIB_VBGL_R3) 86 87 VBoxDispD3D_SDKS = WINDDKWLH 88 # VBoxDispD3D_INCS += ../Wine/include 87 89 88 90 ifeq ($(KBUILD_TARGET_ARCH), amd64) -
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp
r28800 r29432 29 29 30 30 #include "VBoxDispD3D.h" 31 #include "VBoxDispD3DCmn.h" 31 32 32 33 #ifdef VBOXWDDMDISP_DEBUG … … 45 46 case DLL_PROCESS_ATTACH: 46 47 { 47 /* there __try __except are just to ensure the library does not assertion fail in case VBoxGuest is not present 48 * and VbglR3Init / VbglR3Term assertion fail */ 49 __try 50 { 51 // LogRel(("VBoxDispD3D: DLL loaded.\n")); 52 RTR3Init(); 48 RTR3Init(); 49 50 vboxVDbgPrint(("VBoxDispD3D: DLL loaded.\n")); 51 53 52 // VbglR3Init(); 54 }55 __except (EXCEPTION_CONTINUE_EXECUTION)56 {57 }58 59 53 break; 60 54 } … … 62 56 case DLL_PROCESS_DETACH: 63 57 { 64 /* there __try __except are just to ensure the library does not assertion fail in case VBoxGuest is not present 65 * and VbglR3Init / VbglR3Term assertion fail */ 66 // __try 67 // { 68 // LogRel(("VBoxDispD3D: DLL unloaded.\n")); 58 vboxVDbgPrint(("VBoxDispD3D: DLL unloaded.\n")); 69 59 // VbglR3Term(); 70 // }71 // __except (EXCEPTION_CONTINUE_EXECUTION)72 // {73 // }74 60 /// @todo RTR3Term(); 75 61 break; … … 901 887 vboxVDbgPrint(("==> "__FUNCTION__", hAdapter(0x%p)\n", hAdapter)); 902 888 903 //AssertBreakpoint();889 AssertBreakpoint(); 904 890 905 891 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)RTMemAllocZ(sizeof (VBOXWDDMDISP_DEVICE)); … … 1038 1024 vboxVDbgPrint(("<== "__FUNCTION__", hAdapter(0x%p)\n", hAdapter)); 1039 1025 1040 return E_FAIL;1026 return S_OK; 1041 1027 } 1042 1028 … … 1045 1031 vboxVDbgPrint(("==> "__FUNCTION__", hAdapter(0x%p)\n", hAdapter)); 1046 1032 1047 // AssertBreakpoint(); 1048 1049 RTMemFree(hAdapter); 1033 AssertBreakpoint(); 1034 1035 PVBOXWDDMDISP_ADAPTER pAdapter = (PVBOXWDDMDISP_ADAPTER)hAdapter; 1036 if (pAdapter->pD3D9If) 1037 { 1038 HRESULT hr = pAdapter->pD3D9If->Release(); 1039 Assert(hr == S_OK); 1040 VBoxDispD3DClose(&pAdapter->D3D); 1041 } 1042 1043 RTMemFree(pAdapter); 1050 1044 1051 1045 vboxVDbgPrint(("<== "__FUNCTION__", hAdapter(0x%p)\n", hAdapter)); … … 1058 1052 vboxVDbgPrint(("==> "__FUNCTION__"\n")); 1059 1053 1060 // AssertBreakpoint(); 1061 1054 AssertBreakpoint(); 1055 1056 HRESULT hr = S_OK; 1062 1057 PVBOXWDDMDISP_ADAPTER pAdapter = (PVBOXWDDMDISP_ADAPTER)RTMemAllocZ(sizeof (VBOXWDDMDISP_ADAPTER)); 1063 1058 Assert(pAdapter); 1064 if (!pAdapter) 1059 if (pAdapter) 1060 { 1061 pAdapter->hAdapter = pOpenData->hAdapter; 1062 pAdapter->uIfVersion = pOpenData->Interface; 1063 pAdapter->uRtVersion= pOpenData->Version; 1064 pAdapter->RtCallbacks = *pOpenData->pAdapterCallbacks; 1065 1066 pOpenData->hAdapter = pAdapter; 1067 pOpenData->pAdapterFuncs->pfnGetCaps = vboxWddmDispGetCaps; 1068 pOpenData->pAdapterFuncs->pfnCreateDevice = vboxWddmDispCreateDevice; 1069 pOpenData->pAdapterFuncs->pfnCloseAdapter = vboxWddmDispCloseAdapter; 1070 pOpenData->DriverVersion = D3D_UMD_INTERFACE_VERSION; 1071 1072 /* try enable the 3D */ 1073 hr = VBoxDispD3DOpen(&pAdapter->D3D); 1074 Assert(hr == S_OK); 1075 if (hr == S_OK) 1076 { 1077 hr = pAdapter->D3D.pfnDirect3DCreate9Ex(D3D_SDK_VERSION, &pAdapter->pD3D9If); 1078 Assert(hr == S_OK); 1079 if (hr == S_OK) 1080 { 1081 vboxVDbgPrint(("<== "__FUNCTION__", SUCCESS 3D Enabled, pAdapter (0x%p)\n", pAdapter)); 1082 return S_OK; 1083 } 1084 else 1085 vboxVDbgPrintR((__FUNCTION__": pfnDirect3DCreate9Ex failed, hr (%d)\n", hr)); 1086 } 1087 else 1088 vboxVDbgPrintR((__FUNCTION__": VBoxDispD3DOpen failed, hr (%d)\n", hr)); 1089 1090 vboxVDbgPrint(("<== "__FUNCTION__", SUCCESS 3D DISABLED, pAdapter (0x%p)\n", pAdapter)); 1091 return S_OK; 1092 // RTMemFree(pAdapter); 1093 } 1094 else 1065 1095 { 1066 1096 vboxVDbgPrintR((__FUNCTION__": RTMemAllocZ returned NULL\n")); 1067 returnE_OUTOFMEMORY;1097 hr = E_OUTOFMEMORY; 1068 1098 } 1069 1099 1070 pAdapter->hAdapter = pOpenData->hAdapter; 1071 pAdapter->uIfVersion = pOpenData->Interface; 1072 pAdapter->uRtVersion= pOpenData->Version; 1073 pAdapter->RtCallbacks = *pOpenData->pAdapterCallbacks; 1074 1075 pOpenData->hAdapter = pAdapter; 1076 pOpenData->pAdapterFuncs->pfnGetCaps = vboxWddmDispGetCaps; 1077 pOpenData->pAdapterFuncs->pfnCreateDevice = vboxWddmDispCreateDevice; 1078 pOpenData->pAdapterFuncs->pfnCloseAdapter = vboxWddmDispCloseAdapter; 1079 pOpenData->DriverVersion = D3D_UMD_INTERFACE_VERSION; 1080 1081 vboxVDbgPrint(("<== "__FUNCTION__", pAdapter(0x%p)\n", pAdapter)); 1082 1083 return S_OK; 1100 vboxVDbgPrint(("<== "__FUNCTION__", FAILURE, hr (%d)\n", hr)); 1101 1102 return hr; 1084 1103 } 1085 1104 -
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.h
r28800 r29432 16 16 #define ___VBoxDispD3D_h___ 17 17 18 #i fdef DEBUG19 # define VBOXWDDMDISP_DEBUG 20 # endif18 #include "VBoxDispD3DIf.h" 19 20 #include <iprt/cdefs.h> 21 21 22 22 typedef struct VBOXWDDMDISP_ADAPTER … … 25 25 UINT uIfVersion; 26 26 UINT uRtVersion; 27 VBOXDISPD3D D3D; 28 IDirect3D9Ex * pD3D9If; 27 29 D3DDDI_ADAPTERCALLBACKS RtCallbacks; 28 30 } VBOXWDDMDISP_ADAPTER, *PVBOXWDDMDISP_ADAPTER; … … 40 42 } VBOXWDDMDISP_DEVICE, *PVBOXWDDMDISP_DEVICE; 41 43 42 #ifdef VBOXWDDMDISP_DEBUG 43 VOID vboxVDbgDoPrint(LPCSTR szString, ...); 44 45 #define vboxVDbgBreak() AssertBreakpoint() 46 #define vboxVDbgPrint(_m) \ 47 do { \ 48 vboxVDbgDoPrint _m ; \ 49 } while (0) 50 #define vboxVDbgPrintR vboxVDbgPrint 51 #define vboxVDbgPrintF vboxVDbgPrint 52 #else 53 #define vboxVDbgBreak() do {} while (0) 54 #define vboxVDbgPrint(_m) do {} while (0) 55 #define vboxVDbgPrintR vboxVDbgPrint 56 #define vboxVDbgPrintF vboxVDbgPrint 57 #endif 44 DECLINLINE(bool) vboxDispD3DIs3DEnabled(VBOXWDDMDISP_ADAPTER * pAdapter) 45 { 46 return pAdapter->pD3D9If; 47 } 58 48 59 49 #endif /* #ifndef ___VBoxDispD3D_h___ */ -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVbva.cpp
r28800 r29432 266 266 Assert (pRecord && (pRecord->cbRecord & VBVA_F_RECORD_PARTIAL)); 267 267 268 dfprintf((__FUNCTION__": VW %d\n", cb));268 // dfprintf((__FUNCTION__": VW %d\n", cb)); 269 269 270 270 cbHwBufferAvail = vboxHwBufferAvail (pVBVA);
Note:
See TracChangeset
for help on using the changeset viewer.