Changeset 30855 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Display
- Timestamp:
- Jul 14, 2010 6:38:43 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Display
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Display/Makefile.kmk
r30518 r30855 106 106 endif 107 107 108 ifdef VBOXVIDEOWINDBG 109 DLLS += vbvdbg 110 vbvdbg_TEMPLATE = VBOXR3STATIC 111 vbvdbg_DEFS = UNICODE _UNICODE 112 vbvdbg_SOURCES = \ 113 wddm/dbg/VBoxVideoWinDbg.cpp \ 114 wddm/dbg/VBoxVideoWinDbg.def 115 vbvdbg_SDKS = WINDDKWLH 116 endif 117 108 118 include $(KBUILD_PATH)/subfooter.kmk 109 119 -
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispCm.cpp
r30541 r30855 234 234 } 235 235 default: 236 Assert Breakpoint();236 Assert(0); 237 237 return E_FAIL; 238 238 } … … 240 240 241 241 /* should never be here */ 242 Assert Breakpoint();242 Assert(0); 243 243 return E_FAIL; 244 244 } -
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp
r30795 r30855 1084 1084 PVBOXWDDMDISP_ALLOCATION pAlloc; 1085 1085 UINT iBBuf = 0; 1086 for (UINT i = iNewRTFB + 1; i < pRc->cAllocations; ++i, ++iBBuf) 1087 { 1088 pAlloc = &pRc->aAllocations[i]; 1089 Assert(i != iNewRTFB); 1086 Assert(iNewRTFB < pRc->cAllocations); 1087 1088 for (UINT i = 1; i < pRc->cAllocations; ++i, ++iBBuf) 1089 { 1090 UINT iAlloc = (iNewRTFB + i) % pRc->cAllocations; 1091 Assert(iAlloc != iNewRTFB); 1092 pAlloc = &pRc->aAllocations[iAlloc]; 1090 1093 HRESULT tmpHr = vboxWddmRenderTargetUpdateSurface(pDevice, pAlloc, iBBuf); 1091 1094 Assert(tmpHr == S_OK); 1092 1095 } 1093 1096 1094 for (UINT i = 0; iBBuf < pRc->cAllocations-1; ++i, ++iBBuf) 1095 { 1096 Assert(i != iNewRTFB); 1097 pAlloc = &pRc->aAllocations[i]; 1098 HRESULT tmpHr = vboxWddmRenderTargetUpdateSurface(pDevice, pAlloc, iBBuf); 1099 Assert(tmpHr == S_OK); 1100 } 1101 1097 pAlloc = &pRc->aAllocations[iNewRTFB]; 1102 1098 #ifdef VBOXWDDM_WITH_VISIBLE_FB 1103 pAlloc = &pRc->aAllocations[iNewRTFB];1104 1099 HRESULT tmpHr = vboxWddmRenderTargetUpdateSurface(pDevice, pAlloc, ~0UL /* <- for the frontbuffer */); 1105 1100 Assert(tmpHr == S_OK); 1106 1101 #else 1107 pAlloc = &pRc->aAllocations[iNewRTFB];1108 1102 if (pAlloc->pD3DIf) 1109 1103 { … … 1117 1111 { 1118 1112 pAlloc = &pRc->aAllocations[i]; 1113 if (iNewRTFB == i) 1114 { 1115 Assert(!pAlloc->pD3DIf); 1116 } 1117 1119 1118 for (UINT j = i+1; j < pRc->cAllocations; ++j) 1120 1119 { … … 1126 1125 return S_OK; 1127 1126 } 1127 1128 #ifdef DEBUG 1129 static void vboxWddmDbgRenderTargetUpdateCheckSurface(PVBOXWDDMDISP_DEVICE pDevice, PVBOXWDDMDISP_ALLOCATION pAlloc, uint32_t iBBuf) 1130 { 1131 IDirect3DSurface9 *pD3D9Surf; 1132 Assert(pAlloc->enmD3DIfType == VBOXDISP_D3DIFTYPE_SURFACE); 1133 HRESULT hr = pDevice->pDevice9If->GetBackBuffer(0 /*UINT iSwapChain*/, 1134 iBBuf, D3DBACKBUFFER_TYPE_MONO, &pD3D9Surf); 1135 Assert(hr == S_OK); 1136 if (hr == S_OK) 1137 { 1138 Assert(pD3D9Surf); 1139 Assert(pD3D9Surf == pAlloc->pD3DIf); 1140 pD3D9Surf->Release(); 1141 } 1142 } 1143 1144 static void vboxWddmDbgRenderTargetCheck(PVBOXWDDMDISP_DEVICE pDevice, PVBOXWDDMDISP_RESOURCE pRc, uint32_t iNewRTFB) 1145 { 1146 PVBOXWDDMDISP_ALLOCATION pAlloc; 1147 UINT iBBuf = 0; 1148 Assert(iNewRTFB < pRc->cAllocations); 1149 1150 for (UINT i = 1; i < pRc->cAllocations; ++i, ++iBBuf) 1151 { 1152 UINT iAlloc = (iNewRTFB + i) % pRc->cAllocations; 1153 Assert(iAlloc != iNewRTFB); 1154 pAlloc = &pRc->aAllocations[iAlloc]; 1155 vboxWddmDbgRenderTargetUpdateCheckSurface(pDevice, pAlloc, iBBuf); 1156 } 1157 1158 pAlloc = &pRc->aAllocations[iNewRTFB]; 1159 #ifdef VBOXWDDM_WITH_VISIBLE_FB 1160 vboxWddmDbgRenderTargetUpdateCheckSurface(pDevice, pAlloc, ~0UL /* <- for the frontbuffer */); 1161 #else 1162 Assert(pAlloc->pD3DIf == NULL); 1163 #endif 1164 1165 for (UINT i = 0; i < pRc->cAllocations; ++i) 1166 { 1167 pAlloc = &pRc->aAllocations[i]; 1168 if (iNewRTFB == i) 1169 { 1170 Assert(!pAlloc->pD3DIf); 1171 } 1172 1173 for (UINT j = i+1; j < pRc->cAllocations; ++j) 1174 { 1175 PVBOXWDDMDISP_ALLOCATION pAllocJ = &pRc->aAllocations[j]; 1176 Assert(pAlloc->pD3DIf != pAllocJ->pD3DIf); 1177 } 1178 } 1179 } 1180 1181 # define VBOXVDBG_RTGT_STATECHECK(_pDev) (vboxWddmDbgRenderTargetCheck((_pDev), (_pDev)->pRenderTargetRc, (_pDev)->iRenderTargetFrontBuf)) 1182 #else 1183 # define VBOXVDBG_RTGT_STATECHECK(_pDev) do{}while(0) 1184 #endif 1128 1185 1129 1186 static D3DFORMAT vboxDDI2D3DFormat(D3DDDIFORMAT format) … … 1152 1209 return D3DPOOL_DEFAULT; 1153 1210 default: 1154 Assert Breakpoint();1211 Assert(0); 1155 1212 } 1156 1213 return D3DPOOL_DEFAULT; … … 1289 1346 case DLL_PROCESS_ATTACH: 1290 1347 { 1348 #ifdef VBOXWDDMDISP_DEBUG 1349 vboxVDbgVEHandlerRegister(); 1350 #endif 1291 1351 RTR3Init(); 1292 1352 … … 1311 1371 case DLL_PROCESS_DETACH: 1312 1372 { 1373 #ifdef VBOXWDDMDISP_DEBUG 1374 vboxVDbgVEHandlerUnregister(); 1375 #endif 1313 1376 HRESULT hr; 1314 1377 #ifdef VBOXDISPMP_TEST … … 1432 1495 memcpy(pData->pData, gVBoxQueryTypes, VBOX_QUERYTYPE_COUNT() * sizeof (D3DDDIQUERYTYPE)); 1433 1496 #else 1434 Assert Breakpoint();1497 Assert(0); 1435 1498 memset(pData->pData, 0, pData->DataSize); 1436 1499 #endif … … 1525 1588 { 1526 1589 Assert(pData->DataSize >= sizeof (D3DCAPS9)); 1527 // Assert Breakpoint();1590 // Assert(0); 1528 1591 if (pData->DataSize >= sizeof (D3DCAPS9)) 1529 1592 { … … 1579 1642 else 1580 1643 { 1581 Assert Breakpoint();1644 Assert(0); 1582 1645 } 1583 1646 #endif … … 1627 1690 case D3DDDICAPS_GETEXTENSIONCAPS: 1628 1691 vboxVDbgPrint((__FUNCTION__": unimplemented caps type(%d)\n", pData->Type)); 1629 Assert Breakpoint();1692 Assert(0); 1630 1693 if (pData->pData && pData->DataSize) 1631 1694 memset(pData->pData, 0, pData->DataSize); … … 1633 1696 default: 1634 1697 vboxVDbgPrint((__FUNCTION__": unknown caps type(%d)\n", pData->Type)); 1635 Assert Breakpoint();1698 Assert(0); 1636 1699 } 1637 1700 … … 1663 1726 { 1664 1727 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 1665 Assert Breakpoint();1728 Assert(0); 1666 1729 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 1667 1730 return E_FAIL; … … 1758 1821 // if (pStreamData) 1759 1822 // { 1760 // Assert Breakpoint();1823 // Assert(0); 1761 1824 // /* @todo: impl! */ 1762 1825 // } … … 1841 1904 { 1842 1905 /* todo: impl */ 1843 Assert Breakpoint();1906 Assert(0); 1844 1907 } 1845 1908 } … … 1943 2006 break; 1944 2007 default: 1945 Assert Breakpoint();2008 Assert(0); 1946 2009 cbType = 1; 1947 2010 } … … 1970 2033 break; 1971 2034 default: 1972 Assert Breakpoint();2035 Assert(0); 1973 2036 cVertexes = pData->PrimitiveCount; 1974 2037 } … … 2084 2147 { 2085 2148 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2086 Assert Breakpoint();2149 Assert(0); 2087 2150 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2088 2151 return E_FAIL; … … 2092 2155 { 2093 2156 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2094 Assert Breakpoint();2157 Assert(0); 2095 2158 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2096 2159 return E_FAIL; … … 2168 2231 { 2169 2232 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2170 Assert Breakpoint();2233 Assert(0); 2171 2234 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2172 2235 return E_FAIL; … … 2176 2239 { 2177 2240 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2178 Assert Breakpoint();2241 Assert(0); 2179 2242 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2180 2243 return E_FAIL; … … 2184 2247 { 2185 2248 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2186 Assert Breakpoint();2249 Assert(0); 2187 2250 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2188 2251 return E_FAIL; … … 2218 2281 else 2219 2282 { 2220 Assert Breakpoint();2283 Assert(0); 2221 2284 /* @todo: impl */ 2222 2285 } … … 2224 2287 else 2225 2288 { 2226 Assert Breakpoint();2289 Assert(0); 2227 2290 /* @todo: impl */ 2228 2291 } … … 2235 2298 { 2236 2299 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2237 Assert Breakpoint();2300 Assert(0); 2238 2301 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2239 2302 return E_FAIL; … … 2242 2305 { 2243 2306 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2244 Assert Breakpoint();2307 Assert(0); 2245 2308 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2246 2309 return E_FAIL; … … 2274 2337 { 2275 2338 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2276 Assert Breakpoint();2339 Assert(0); 2277 2340 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2278 2341 return E_FAIL; … … 2282 2345 { 2283 2346 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2284 Assert Breakpoint();2347 Assert(0); 2285 2348 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2286 2349 return E_FAIL; … … 2304 2367 { 2305 2368 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2306 Assert Breakpoint();2369 Assert(0); 2307 2370 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2308 2371 return E_FAIL; … … 2311 2374 { 2312 2375 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2313 Assert Breakpoint();2376 Assert(0); 2314 2377 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2315 2378 return E_FAIL; … … 2346 2409 { 2347 2410 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2348 Assert Breakpoint();2411 Assert(0); 2349 2412 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2350 2413 return E_FAIL; … … 2353 2416 { 2354 2417 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2355 Assert Breakpoint();2418 Assert(0); 2356 2419 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2357 2420 return E_FAIL; … … 2360 2423 { 2361 2424 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2362 Assert Breakpoint();2425 Assert(0); 2363 2426 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2364 2427 return E_FAIL; … … 2367 2430 { 2368 2431 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2369 Assert Breakpoint();2432 Assert(0); 2370 2433 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2371 2434 return E_FAIL; … … 2386 2449 { 2387 2450 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2388 Assert Breakpoint();2451 Assert(0); 2389 2452 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2390 2453 return E_NOTIMPL; … … 2708 2771 else 2709 2772 { 2710 Assert Breakpoint();2773 Assert(0); 2711 2774 } 2712 2775 } … … 2744 2807 { 2745 2808 vboxVDbgPrintF((__FUNCTION__": Implement Box area")); 2746 Assert Breakpoint();2809 Assert(0); 2747 2810 } 2748 2811 else … … 2906 2969 else 2907 2970 { 2908 Assert Breakpoint();2971 Assert(0); 2909 2972 } 2910 2973 } … … 2939 3002 { 2940 3003 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2941 Assert Breakpoint();3004 Assert(0); 2942 3005 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2943 3006 return E_FAIL; … … 2946 3009 { 2947 3010 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2948 Assert Breakpoint();3011 Assert(0); 2949 3012 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2950 3013 return E_FAIL; … … 2953 3016 { 2954 3017 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2955 Assert Breakpoint();3018 Assert(0); 2956 3019 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2957 3020 return E_FAIL; … … 3074 3137 if (pResource->Flags.SharedResource) 3075 3138 { 3076 Assert Breakpoint(); /* <-- need to test that */3139 Assert(0); /* <-- need to test that */ 3077 3140 bIssueCreateResource = true; 3078 3141 } … … 3645 3708 Assert(pDevice->pDevice9If); 3646 3709 #if 1 3710 VBOXVDBG_RTGT_STATECHECK(pDevice); 3711 3647 3712 hr = pDevice->pDevice9If->Present(NULL, /* CONST RECT * pSourceRect */ 3648 3713 NULL, /* CONST RECT * pDestRect */ … … 3665 3730 Assert(pRc->aAllocations[0].enmD3DIfType == VBOXDISP_D3DIFTYPE_SURFACE); 3666 3731 Assert(pRc->RcDesc.fFlags.RenderTarget); 3667 uint32_t iNewRTFB = pDevice->iRenderTargetFrontBuf + 1; 3668 if (iNewRTFB >= pRc->cAllocations) 3669 iNewRTFB = 0; 3732 uint32_t iNewRTFB = (pDevice->iRenderTargetFrontBuf + 1) % pRc->cAllocations; 3670 3733 3671 3734 Assert(pDevice->iRenderTargetFrontBuf != iNewRTFB); … … 3676 3739 /* assign a new frontbuffer index */ 3677 3740 pDevice->iRenderTargetFrontBuf = iNewRTFB; 3741 3742 VBOXVDBG_RTGT_STATECHECK(pDevice); 3678 3743 } 3679 3744 D3DDDICB_PRESENT DdiPresent = {0}; … … 3907 3972 { 3908 3973 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3909 Assert Breakpoint();3974 Assert(0); 3910 3975 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3911 3976 return E_FAIL; … … 3914 3979 { 3915 3980 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3916 Assert Breakpoint();3981 Assert(0); 3917 3982 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3918 3983 return E_FAIL; … … 3921 3986 { 3922 3987 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3923 Assert Breakpoint();3988 Assert(0); 3924 3989 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3925 3990 return E_FAIL; … … 3952 4017 } 3953 4018 default: 3954 Assert Breakpoint();4019 Assert(0); 3955 4020 break; 3956 4021 } … … 3980 4045 } 3981 4046 default: 3982 Assert Breakpoint();4047 Assert(0); 3983 4048 hr = E_FAIL; 3984 4049 break; … … 4017 4082 } 4018 4083 default: 4019 Assert Breakpoint();4084 Assert(0); 4020 4085 hr = E_FAIL; 4021 4086 break; … … 4023 4088 return hr; 4024 4089 } 4090 4091 #ifdef DEBUG_misha 4092 static void vboxWddmDbgSurfData(PVBOXWDDMDISP_ALLOCATION pAlloc, IDirect3DSurface9 *pSurf) 4093 { 4094 D3DLOCKED_RECT Lr; 4095 HRESULT tmpHr = pSurf->LockRect(&Lr, NULL, D3DLOCK_READONLY); 4096 Assert(tmpHr == S_OK); 4097 if (tmpHr == S_OK) 4098 { 4099 UINT bpp = vboxWddmCalcBitsPerPixel(pAlloc->SurfDesc.format); 4100 Assert(bpp == pAlloc->SurfDesc.bpp); 4101 Assert(pAlloc->SurfDesc.pitch == Lr.Pitch); 4102 vboxVDbgPrintF(("!vbvdbg.ms 0x%p 0x%x 0x%x 0x%x 0x%x\n", 4103 Lr.pBits, pAlloc->SurfDesc.width, pAlloc->SurfDesc.height, bpp, Lr.Pitch)); 4104 Assert(0); 4105 tmpHr = pSurf->UnlockRect(); 4106 } 4107 } 4108 #endif 4025 4109 4026 4110 static HRESULT APIENTRY vboxWddmDDevBlt(HANDLE hDevice, CONST D3DDDIARG_BLT* pData) … … 4106 4190 { 4107 4191 Assert(pSrcSurfIf); 4192 4193 #ifdef DEBUG_misha 4194 { 4195 D3DLOCKED_RECT Lr; 4196 PVBOXWDDMDISP_ALLOCATION pAlloc = &pSrcRc->aAllocations[pData->SrcSubResourceIndex]; 4197 HRESULT srcHr = pSrcSurfIf->LockRect(&Lr, NULL, D3DLOCK_READONLY); 4198 Assert(srcHr == S_OK); 4199 if (srcHr == S_OK) 4200 { 4201 UINT bpp = vboxWddmCalcBitsPerPixel(pAlloc->SurfDesc.format); 4202 Assert(bpp == pAlloc->SurfDesc.bpp); 4203 Assert(pAlloc->SurfDesc.pitch == Lr.Pitch); 4204 vboxVDbgPrintF(("src: !vbvdbg.ms 0x%p 0x%x 0x%x 0x%x 0x%x\n", 4205 Lr.pBits, pAlloc->SurfDesc.width, pAlloc->SurfDesc.height, bpp, Lr.Pitch)); 4206 } 4207 4208 pAlloc = &pDstRc->aAllocations[pData->DstSubResourceIndex]; 4209 HRESULT dstHr = pDstSurfIf->LockRect(&Lr, NULL, D3DLOCK_READONLY); 4210 Assert(dstHr == S_OK); 4211 if (dstHr == S_OK) 4212 { 4213 UINT bpp = vboxWddmCalcBitsPerPixel(pAlloc->SurfDesc.format); 4214 Assert(bpp == pAlloc->SurfDesc.bpp); 4215 Assert(pAlloc->SurfDesc.pitch == Lr.Pitch); 4216 vboxVDbgPrintF(("dst: !vbvdbg.ms 0x%p 0x%x 0x%x 0x%x 0x%x\n", 4217 Lr.pBits, pAlloc->SurfDesc.width, pAlloc->SurfDesc.height, bpp, Lr.Pitch)); 4218 } 4219 4220 Assert(0); 4221 4222 if (srcHr == S_OK) 4223 { 4224 srcHr = pSrcSurfIf->UnlockRect(); 4225 Assert(srcHr == S_OK); 4226 } 4227 4228 if (dstHr == S_OK) 4229 { 4230 dstHr = pDstSurfIf->UnlockRect(); 4231 Assert(dstHr == S_OK); 4232 } 4233 } 4234 #endif 4108 4235 /* we support only Point & Linear, we ignore [Begin|Continue|End]PresentToDwm */ 4109 4236 Assert((pData->Flags.Value & (~(0x00000100 | 0x00000200 | 0x00000400 | 0x00000001 | 0x00000002))) == 0); … … 4114 4241 vboxDDI2D3DBltFlags(pData->Flags)); 4115 4242 Assert(hr == S_OK); 4243 4244 #ifdef DEBUG_misha 4245 { 4246 D3DLOCKED_RECT Lr; 4247 PVBOXWDDMDISP_ALLOCATION pAlloc = &pSrcRc->aAllocations[pData->SrcSubResourceIndex]; 4248 HRESULT srcHr = pSrcSurfIf->LockRect(&Lr, NULL, D3DLOCK_READONLY); 4249 Assert(srcHr == S_OK); 4250 if (srcHr == S_OK) 4251 { 4252 UINT bpp = vboxWddmCalcBitsPerPixel(pAlloc->SurfDesc.format); 4253 Assert(bpp == pAlloc->SurfDesc.bpp); 4254 Assert(pAlloc->SurfDesc.pitch == Lr.Pitch); 4255 vboxVDbgPrintF(("src: !vbvdbg.ms 0x%p 0x%x 0x%x 0x%x 0x%x\n", 4256 Lr.pBits, pAlloc->SurfDesc.width, pAlloc->SurfDesc.height, bpp, Lr.Pitch)); 4257 } 4258 4259 pAlloc = &pDstRc->aAllocations[pData->DstSubResourceIndex]; 4260 HRESULT dstHr = pDstSurfIf->LockRect(&Lr, NULL, D3DLOCK_READONLY); 4261 Assert(dstHr == S_OK); 4262 if (dstHr == S_OK) 4263 { 4264 UINT bpp = vboxWddmCalcBitsPerPixel(pAlloc->SurfDesc.format); 4265 Assert(bpp == pAlloc->SurfDesc.bpp); 4266 Assert(pAlloc->SurfDesc.pitch == Lr.Pitch); 4267 vboxVDbgPrintF(("dst: !vbvdbg.ms 0x%p 0x%x 0x%x 0x%x 0x%x\n", 4268 Lr.pBits, pAlloc->SurfDesc.width, pAlloc->SurfDesc.height, bpp, Lr.Pitch)); 4269 } 4270 4271 Assert(0); 4272 4273 if (srcHr == S_OK) 4274 { 4275 srcHr = pSrcSurfIf->UnlockRect(); 4276 Assert(srcHr == S_OK); 4277 } 4278 4279 if (dstHr == S_OK) 4280 { 4281 dstHr = pDstSurfIf->UnlockRect(); 4282 Assert(dstHr == S_OK); 4283 } 4284 } 4285 #endif 4116 4286 pSrcSurfIf->Release(); 4117 4287 } … … 4124 4294 { 4125 4295 /* todo: fallback to memcpy or whatever ? */ 4126 Assert Breakpoint();4296 Assert(0); 4127 4297 } 4128 4298 … … 4182 4352 { 4183 4353 4184 Assert Breakpoint();4354 Assert(0); 4185 4355 /* @todo: impl */ 4186 4356 } … … 4188 4358 else 4189 4359 { 4190 Assert Breakpoint();4360 Assert(0); 4191 4361 /* @todo: impl */ 4192 4362 } … … 4226 4396 else 4227 4397 { 4228 Assert Breakpoint();4398 Assert(0); 4229 4399 /* @todo: impl */ 4230 4400 } … … 4238 4408 { 4239 4409 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4240 Assert Breakpoint();4410 Assert(0); 4241 4411 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4242 4412 return E_FAIL; … … 4245 4415 { 4246 4416 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4247 Assert Breakpoint();4417 Assert(0); 4248 4418 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4249 4419 return E_FAIL; … … 4252 4422 { 4253 4423 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4254 Assert Breakpoint();4424 Assert(0); 4255 4425 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4256 4426 return E_FAIL; … … 4259 4429 { 4260 4430 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4261 Assert Breakpoint();4431 Assert(0); 4262 4432 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4263 4433 return E_FAIL; … … 4266 4436 { 4267 4437 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4268 Assert Breakpoint();4438 Assert(0); 4269 4439 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4270 4440 return E_FAIL; … … 4273 4443 { 4274 4444 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4275 Assert Breakpoint();4445 Assert(0); 4276 4446 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4277 4447 return E_FAIL; … … 4333 4503 { 4334 4504 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4335 Assert Breakpoint();4505 Assert(0); 4336 4506 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4337 4507 return E_FAIL; … … 4392 4562 { 4393 4563 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4394 Assert Breakpoint();4564 Assert(0); 4395 4565 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4396 4566 return E_FAIL; … … 4399 4569 { 4400 4570 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4401 Assert Breakpoint();4571 Assert(0); 4402 4572 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4403 4573 return E_FAIL; … … 4406 4576 { 4407 4577 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4408 Assert Breakpoint();4578 Assert(0); 4409 4579 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4410 4580 return E_FAIL; … … 4413 4583 { 4414 4584 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4415 Assert Breakpoint();4585 Assert(0); 4416 4586 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4417 4587 return E_FAIL; … … 4420 4590 { 4421 4591 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4422 Assert Breakpoint();4592 Assert(0); 4423 4593 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4424 4594 return E_FAIL; … … 4427 4597 { 4428 4598 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4429 Assert Breakpoint();4599 Assert(0); 4430 4600 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4431 4601 return E_FAIL; … … 4434 4604 { 4435 4605 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4436 Assert Breakpoint();4606 Assert(0); 4437 4607 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4438 4608 return E_FAIL; … … 4441 4611 { 4442 4612 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4443 Assert Breakpoint();4613 Assert(0); 4444 4614 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4445 4615 return E_FAIL; … … 4448 4618 { 4449 4619 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4450 Assert Breakpoint();4620 Assert(0); 4451 4621 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4452 4622 return E_FAIL; … … 4455 4625 { 4456 4626 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4457 Assert Breakpoint();4627 Assert(0); 4458 4628 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4459 4629 return E_FAIL; … … 4462 4632 { 4463 4633 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4464 Assert Breakpoint();4634 Assert(0); 4465 4635 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4466 4636 return E_FAIL; … … 4469 4639 { 4470 4640 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4471 Assert Breakpoint();4641 Assert(0); 4472 4642 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4473 4643 return E_FAIL; … … 4476 4646 { 4477 4647 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4478 Assert Breakpoint();4648 Assert(0); 4479 4649 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4480 4650 return E_FAIL; … … 4483 4653 { 4484 4654 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4485 Assert Breakpoint();4655 Assert(0); 4486 4656 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4487 4657 return E_FAIL; … … 4490 4660 { 4491 4661 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4492 Assert Breakpoint();4662 Assert(0); 4493 4663 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4494 4664 return E_FAIL; … … 4497 4667 { 4498 4668 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4499 Assert Breakpoint();4669 Assert(0); 4500 4670 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4501 4671 return E_FAIL; … … 4680 4850 { 4681 4851 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4682 Assert Breakpoint();4852 Assert(0); 4683 4853 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4684 4854 return E_FAIL; … … 4687 4857 { 4688 4858 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4689 Assert Breakpoint();4859 Assert(0); 4690 4860 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4691 4861 return E_FAIL; … … 4716 4886 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4717 4887 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4718 Assert Breakpoint();4888 Assert(0); 4719 4889 HRESULT hr = S_OK; 4720 4890 #if 0 … … 4805 4975 break; 4806 4976 default: 4807 Assert Breakpoint();4977 Assert(0); 4808 4978 hr = E_INVALIDARG; 4809 4979 } … … 4814 4984 else 4815 4985 { 4816 Assert Breakpoint(); /* <-- need to test that */4986 Assert(0); /* <-- need to test that */ 4817 4987 4818 4988 /* this is a "generic" resource whose creation is initiaded by the UMD */ … … 4859 5029 { 4860 5030 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4861 Assert Breakpoint();5031 Assert(0); 4862 5032 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4863 5033 return E_FAIL; … … 4867 5037 { 4868 5038 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4869 Assert Breakpoint();5039 Assert(0); 4870 5040 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4871 5041 return E_FAIL; … … 4877 5047 vboxVDbgPrint(("==> "__FUNCTION__", hAdapter(0x%p), Interface(%d), Version(%d)\n", hAdapter, pCreateData->Interface, pCreateData->Version)); 4878 5048 4879 // Assert Breakpoint();5049 // Assert(0); 4880 5050 4881 5051 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)RTMemAllocZ(sizeof (VBOXWDDMDISP_DEVICE)); … … 5044 5214 vboxVDbgPrint(("==> "__FUNCTION__", hAdapter(0x%p)\n", hAdapter)); 5045 5215 5046 // Assert Breakpoint();5216 // Assert(0); 5047 5217 5048 5218 PVBOXWDDMDISP_ADAPTER pAdapter = (PVBOXWDDMDISP_ADAPTER)hAdapter; … … 5185 5355 OutputDebugStringA(szBuffer); 5186 5356 } 5357 5358 static PVOID g_VBoxWDbgVEHandler = NULL; 5359 LONG WINAPI vboxVDbgVectoredHandler(struct _EXCEPTION_POINTERS *pExceptionInfo) 5360 { 5361 PEXCEPTION_RECORD pExceptionRecord = pExceptionInfo->ExceptionRecord; 5362 PCONTEXT pContextRecord = pExceptionInfo->ContextRecord; 5363 switch (pExceptionRecord->ExceptionCode) 5364 { 5365 case 0x40010006: /* <- OutputDebugString exception, ignore */ 5366 break; 5367 default: 5368 Assert(0); 5369 break; 5370 } 5371 return EXCEPTION_CONTINUE_SEARCH; 5372 } 5373 5374 void vboxVDbgVEHandlerRegister() 5375 { 5376 Assert(!g_VBoxWDbgVEHandler); 5377 g_VBoxWDbgVEHandler = AddVectoredExceptionHandler(1,vboxVDbgVectoredHandler); 5378 Assert(g_VBoxWDbgVEHandler); 5379 } 5380 5381 void vboxVDbgVEHandlerUnregister() 5382 { 5383 Assert(g_VBoxWDbgVEHandler); 5384 ULONG uResult = RemoveVectoredExceptionHandler(g_VBoxWDbgVEHandler); 5385 Assert(uResult); 5386 g_VBoxWDbgVEHandler = NULL; 5387 } 5388 5187 5389 #endif -
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3DCmn.h
r30657 r30855 37 37 #ifdef DEBUG 38 38 # define VBOXWDDMDISP_DEBUG 39 # define VBOXWDDMDISP_DEBUG_FLOW 39 40 #endif 40 41 … … 56 57 #ifdef VBOXWDDMDISP_DEBUG 57 58 VOID vboxVDbgDoPrint(LPCSTR szString, ...); 59 void vboxVDbgVEHandlerRegister(); 60 void vboxVDbgVEHandlerUnregister(); 58 61 59 62 #define vboxVDbgBreak() AssertBreakpoint() … … 63 66 } while (0) 64 67 #define vboxVDbgPrintR vboxVDbgPrint 65 #define vboxVDbgPrintF(_m) do {} while (0) 68 #ifdef VBOXWDDMDISP_DEBUG_FLOW 69 # define vboxVDbgPrintF vboxVDbgPrint 70 #else 71 # define vboxVDbgPrintF(_m) do {} while (0) 72 #endif 66 73 #else 67 74 #define vboxVDbgBreak() do {} while (0)
Note:
See TracChangeset
for help on using the changeset viewer.