Changeset 27458 in vbox for trunk/src/VBox
- Timestamp:
- Mar 17, 2010 4:46:14 PM (15 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp
r26928 r27458 1 1 /** @file 2 2 * 3 * VBoxVideo D 3D3 * VBoxVideo Display D3D User mode dll 4 4 * 5 5 * Copyright (C) 2010 Sun Microsystems, Inc. … … 23 23 #include <iprt/initterm.h> 24 24 #include <iprt/log.h> 25 #include <iprt/mem.h> 26 25 27 #include <VBox/Log.h> 26 28 27 29 #include <VBox/VBoxGuestLib.h> 30 31 #include "VBoxDispD3D.h" 32 33 #ifdef VBOXWDDMDISP_DEBUG 34 # include <stdio.h> 35 #endif 28 36 29 37 /** … … 38 46 case DLL_PROCESS_ATTACH: 39 47 { 40 RTR3Init(); 41 VbglR3Init(); 42 43 AssertBreakpoint(); 44 LogRel(("VBoxDispD3D: DLL loaded.\n")); 45 46 // DisableThreadLibraryCalls(hInstance); 47 // hDllInstance = hInstance; 48 /* there __try __except are just to ensure the library does not assertion fail in case VBoxGuest is not present 49 * and VbglR3Init / VbglR3Term assertion fail */ 50 __try 51 { 52 // LogRel(("VBoxDispD3D: DLL loaded.\n")); 53 RTR3Init(); 54 // VbglR3Init(); 55 } 56 __except (EXCEPTION_CONTINUE_EXECUTION) 57 { 58 } 59 48 60 break; 49 61 } … … 51 63 case DLL_PROCESS_DETACH: 52 64 { 53 LogRel(("VBoxDispD3D: DLL unloaded.\n")); 54 VbglR3Term(); 65 /* there __try __except are just to ensure the library does not assertion fail in case VBoxGuest is not present 66 * and VbglR3Init / VbglR3Term assertion fail */ 67 // __try 68 // { 69 // LogRel(("VBoxDispD3D: DLL unloaded.\n")); 70 // VbglR3Term(); 71 // } 72 // __except (EXCEPTION_CONTINUE_EXECUTION) 73 // { 74 // } 55 75 /// @todo RTR3Term(); 56 76 break; … … 63 83 } 64 84 65 __checkReturn HRESULT APIENTRY OpenAdapter(__inout D3DDDIARG_OPENADAPTER* pOpenData) 66 { 67 AssertBreakpoint(); 85 static HRESULT APIENTRY vboxWddmDispGetCaps (HANDLE hAdapter, CONST D3DDDIARG_GETCAPS* pData) 86 { 87 vboxVDbgPrint(("==>"__FUNCTION__", hAdapter(0x%p), caps type(%d)\n", hAdapter, pData->Type)); 88 AssertBreakpoint(); 89 90 switch (pData->Type) 91 { 92 case D3DDDICAPS_DDRAW: 93 case D3DDDICAPS_DDRAW_MODE_SPECIFIC: 94 case D3DDDICAPS_GETFORMATCOUNT: 95 case D3DDDICAPS_GETFORMATDATA: 96 case D3DDDICAPS_GETMULTISAMPLEQUALITYLEVELS: 97 case D3DDDICAPS_GETD3DQUERYCOUNT: 98 case D3DDDICAPS_GETD3DQUERYDATA: 99 case D3DDDICAPS_GETD3D3CAPS: 100 case D3DDDICAPS_GETD3D5CAPS: 101 case D3DDDICAPS_GETD3D6CAPS: 102 case D3DDDICAPS_GETD3D7CAPS: 103 case D3DDDICAPS_GETD3D8CAPS: 104 case D3DDDICAPS_GETD3D9CAPS: 105 case D3DDDICAPS_GETDECODEGUIDCOUNT: 106 case D3DDDICAPS_GETDECODEGUIDS: 107 case D3DDDICAPS_GETDECODERTFORMATCOUNT: 108 case D3DDDICAPS_GETDECODERTFORMATS: 109 case D3DDDICAPS_GETDECODECOMPRESSEDBUFFERINFOCOUNT: 110 case D3DDDICAPS_GETDECODECOMPRESSEDBUFFERINFO: 111 case D3DDDICAPS_GETDECODECONFIGURATIONCOUNT: 112 case D3DDDICAPS_GETDECODECONFIGURATIONS: 113 case D3DDDICAPS_GETVIDEOPROCESSORDEVICEGUIDCOUNT: 114 case D3DDDICAPS_GETVIDEOPROCESSORDEVICEGUIDS: 115 case D3DDDICAPS_GETVIDEOPROCESSORRTFORMATCOUNT: 116 case D3DDDICAPS_GETVIDEOPROCESSORRTFORMATS: 117 case D3DDDICAPS_GETVIDEOPROCESSORRTSUBSTREAMFORMATCOUNT: 118 case D3DDDICAPS_GETVIDEOPROCESSORRTSUBSTREAMFORMATS: 119 case D3DDDICAPS_GETVIDEOPROCESSORCAPS: 120 case D3DDDICAPS_GETPROCAMPRANGE: 121 case D3DDDICAPS_FILTERPROPERTYRANGE: 122 case D3DDDICAPS_GETEXTENSIONGUIDCOUNT: 123 case D3DDDICAPS_GETEXTENSIONGUIDS: 124 case D3DDDICAPS_GETEXTENSIONCAPS: 125 case D3DDDICAPS_GETGAMMARAMPCAPS: 126 break; 127 default: 128 AssertBreakpoint(); 129 } 130 131 vboxVDbgPrint(("<=="__FUNCTION__", hAdapter(0x%p), caps type(%d)\n", hAdapter, pData->Type)); 132 68 133 return S_OK; 69 134 } 135 136 static HRESULT APIENTRY vboxWddmDispCreateDevice (IN HANDLE hAdapter, IN D3DDDIARG_CREATEDEVICE* pCreateData) 137 { 138 vboxVDbgPrint(("==>"__FUNCTION__", hAdapter(0x%p)\n", hAdapter)); 139 140 AssertBreakpoint(); 141 142 vboxVDbgPrint(("<=="__FUNCTION__", hAdapter(0x%p)\n", hAdapter)); 143 144 return E_FAIL; 145 } 146 147 static HRESULT APIENTRY vboxWddmDispCloseAdapter (IN HANDLE hAdapter) 148 { 149 vboxVDbgPrint(("==>"__FUNCTION__", hAdapter(0x%p)\n", hAdapter)); 150 151 AssertBreakpoint(); 152 153 RTMemFree(hAdapter); 154 155 vboxVDbgPrint(("<=="__FUNCTION__", hAdapter(0x%p)\n", hAdapter)); 156 157 return S_OK; 158 } 159 160 HRESULT APIENTRY OpenAdapter (__inout D3DDDIARG_OPENADAPTER* pOpenData) 161 { 162 vboxVDbgPrint(("==>"__FUNCTION__"\n")); 163 164 AssertBreakpoint(); 165 166 PVBOXWDDMDISP_ADAPTER pAdapter = (PVBOXWDDMDISP_ADAPTER)RTMemAllocZ(sizeof (VBOXWDDMDISP_ADAPTER)); 167 Assert(pAdapter); 168 if (!pAdapter) 169 { 170 vboxVDbgPrintR((__FUNCTION__": RTMemAllocZ returned NULL\n")); 171 return E_OUTOFMEMORY; 172 } 173 174 pAdapter->hAdapter = pOpenData->hAdapter; 175 pAdapter->uIfVersion = pOpenData->Interface; 176 pAdapter->uRtVersion= pOpenData->Version; 177 pAdapter->RtCallbacks = *pOpenData->pAdapterCallbacks; 178 179 pOpenData->hAdapter = pAdapter; 180 pOpenData->pAdapterFuncs->pfnGetCaps = vboxWddmDispGetCaps; 181 pOpenData->pAdapterFuncs->pfnCreateDevice = vboxWddmDispCreateDevice; 182 pOpenData->pAdapterFuncs->pfnCloseAdapter = vboxWddmDispCloseAdapter; 183 pOpenData->DriverVersion = D3D_UMD_INTERFACE_VERSION; 184 185 vboxVDbgPrint(("<=="__FUNCTION__", pAdapter(0x%p)\n", pAdapter)); 186 187 return S_OK; 188 } 189 190 #ifdef VBOXWDDMDISP_DEBUG 191 VOID vboxVDbgDoPrint(LPCSTR szString, ...) 192 { 193 char szBuffer[1024] = {0}; 194 va_list pArgList; 195 va_start(pArgList, szString); 196 _vsnprintf(szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0]), szString, pArgList); 197 va_end(pArgList); 198 199 OutputDebugStringA(szBuffer); 200 } 201 #endif -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
r27433 r27458 770 770 ) 771 771 { 772 dfprintf(("==> "__FUNCTION__ ", context(0x%p), msg(0x%x)\n", MiniportDeviceContext, MessageNumber));772 // dfprintf(("==> "__FUNCTION__ ", context(0x%p), msg(0x%x)\n", MiniportDeviceContext, MessageNumber)); 773 773 774 774 vboxVDbgBreakFv(); … … 865 865 } 866 866 867 dfprintf(("<== "__FUNCTION__ ", context(0x%p), bOur(0x%x)\n", MiniportDeviceContext, (ULONG)bOur));867 // dfprintf(("<== "__FUNCTION__ ", context(0x%p), bOur(0x%x)\n", MiniportDeviceContext, (ULONG)bOur)); 868 868 869 869 return bOur; … … 899 899 ) 900 900 { 901 dfprintf(("==> "__FUNCTION__ ", context(0x%p)\n", MiniportDeviceContext));901 // dfprintf(("==> "__FUNCTION__ ", context(0x%p)\n", MiniportDeviceContext)); 902 902 903 903 vboxVDbgBreakFv(); … … 934 934 pDevExt->u.primary.DxgkInterface.DxgkCbNotifyDpc(pDevExt->u.primary.DxgkInterface.DeviceHandle); 935 935 936 dfprintf(("<== "__FUNCTION__ ", context(0x%p)\n", MiniportDeviceContext));936 // dfprintf(("<== "__FUNCTION__ ", context(0x%p)\n", MiniportDeviceContext)); 937 937 } 938 938 … … 1695 1695 NTSTATUS Status = STATUS_SUCCESS; 1696 1696 1697 dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));1697 // dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter)); 1698 1698 1699 1699 vboxVDbgBreakFv(); … … 1737 1737 vboxVdmaCBufDrSubmit (pDevExt, &pDevExt->u.primary.Vdma, pDr); 1738 1738 1739 dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", hAdapter));1739 // dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", hAdapter)); 1740 1740 1741 1741 return Status; … … 1791 1791 case DXGK_OPERATION_DISCARD_CONTENT: 1792 1792 { 1793 AssertBreakpoint();1793 // AssertBreakpoint(); 1794 1794 break; 1795 1795 } … … 1833 1833 dfprintf(("==> "__FUNCTION__ ", hAdapter(0x%x)\n", hAdapter)); 1834 1834 1835 AssertBreakpoint();1835 vboxVDbgBreakFv(); 1836 1836 /* @todo: fixme: implement */ 1837 1837 … … 1847 1847 CONST DXGKARG_SETPOINTERSHAPE* pSetPointerShape) 1848 1848 { 1849 dfprintf(("==> "__FUNCTION__ ", hAdapter(0x%x)\n", hAdapter));1850 1851 AssertBreakpoint();1849 // dfprintf(("==> "__FUNCTION__ ", hAdapter(0x%x)\n", hAdapter)); 1850 1851 vboxVDbgBreakFv(); 1852 1852 /* @todo: fixme: implement */ 1853 1853 1854 dfprintf(("<== "__FUNCTION__ ", hAdapter(0x%x)\n", hAdapter));1854 // dfprintf(("<== "__FUNCTION__ ", hAdapter(0x%x)\n", hAdapter)); 1855 1855 1856 1856 return STATUS_NOT_SUPPORTED; … … 2665 2665 PAGED_CODE(); 2666 2666 2667 dfprintf(("==> "__FUNCTION__ ", hContext(0x%x)\n", hContext));2667 // dfprintf(("==> "__FUNCTION__ ", hContext(0x%x)\n", hContext)); 2668 2668 2669 2669 vboxVDbgBreakFv(); … … 2783 2783 } 2784 2784 2785 dfprintf(("<== "__FUNCTION__ ", hContext(0x%x), Status(0x%x)\n", hContext, Status));2785 // dfprintf(("<== "__FUNCTION__ ", hContext(0x%x), Status(0x%x)\n", hContext, Status)); 2786 2786 2787 2787 return Status;
Note:
See TracChangeset
for help on using the changeset viewer.