儲存庫 vbox 的更動 41472
- 時間撮記:
- 2012-5-29 上午07:12:42 (12 年 以前)
- 位置:
- trunk/src/VBox/Additions/WINNT/Graphics/Video
- 檔案:
-
- 修改 3 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/common/VBoxVideoLog.h
r39160 r41472 40 40 #endif 41 41 42 #ifndef VBOX_VIDEO_LOG_FORMATTER 43 # define VBOX_VIDEO_LOG_FORMATTER(_logger, _severity, _a) \ 44 do \ 45 { \ 46 _logger((VBOX_VIDEO_LOG_PREFIX_FMT _severity, VBOX_VIDEO_LOG_PREFIX_PARMS)); \ 47 _logger(_a); \ 48 _logger((VBOX_VIDEO_LOG_SUFFIX_FMT VBOX_VIDEO_LOG_SUFFIX_PARMS)); \ 49 } while (0) 50 #endif 51 42 52 /* Uncomment to show file/line info in the log */ 43 53 /*#define VBOX_VIDEO_LOG_SHOWLINEINFO*/ … … 66 76 } while (0) 67 77 68 #define _LOGMSG(_logger, _ a)\78 #define _LOGMSG(_logger, _severity, _a) \ 69 79 do \ 70 80 { \ 71 _logger((VBOX_VIDEO_LOG_PREFIX_FMT, VBOX_VIDEO_LOG_PREFIX_PARMS)); \ 72 _logger(_a); \ 73 _logger((VBOX_VIDEO_LOG_SUFFIX_FMT VBOX_VIDEO_LOG_SUFFIX_PARMS)); \ 81 VBOX_VIDEO_LOG_FORMATTER(_logger, _severity, _a); \ 74 82 } while (0) 75 83 … … 89 97 #endif 90 98 91 #define WARN_NOBP(_a) \92 do\93 {\94 _WARN_LOGGER((VBOX_VIDEO_LOG_PREFIX_FMT"WARNING! ", VBOX_VIDEO_LOG_PREFIX_PARMS));\95 _WARN_LOGGER(_a);\96 _WARN_LOGGER((VBOX_VIDEO_LOG_SUFFIX_FMT VBOX_VIDEO_LOG_SUFFIX_PARMS));\99 #define WARN_NOBP(_a) _LOGMSG(VBOX_VIDEO_LOG_LOGGER, "WARNING! :", _a) 100 #define WARN(_a) \ 101 do \ 102 { \ 103 WARN_NOBP(_a); \ 104 BP_WARN(); \ 97 105 } while (0) 98 99 #define WARN(_a) \100 do \101 { \102 WARN_NOBP(_a); \103 BP_WARN(); \104 } while (0)105 106 106 #define ASSERT_WARN(_a, _w) do {\ 107 107 if(!(_a)) { \ … … 110 110 } while (0) 111 111 112 #define LOG(_a) _LOGMSG(VBOX_VIDEO_LOG_LOGGER, _a)113 #define LOGREL(_a) _LOGMSG(VBOX_VIDEO_LOGREL_LOGGER, _a)114 #define LOGF(_a) _LOGMSG(VBOX_VIDEO_LOGFLOW_LOGGER, _a)112 #define LOG(_a) _LOGMSG(VBOX_VIDEO_LOG_LOGGER, "", _a) 113 #define LOGREL(_a) _LOGMSG(VBOX_VIDEO_LOGREL_LOGGER, "", _a) 114 #define LOGF(_a) _LOGMSG(VBOX_VIDEO_LOGFLOW_LOGGER, "", _a) 115 115 #define LOGF_ENTER() LOGF(("ENTER")) 116 116 #define LOGF_LEAVE() LOGF(("LEAVE")) -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.cpp
r41374 r41472 48 48 49 49 #include <iprt/asm.h> 50 #include <iprt/assert.h> 50 51 51 52 #ifdef VBOXWDDMDISP_DEBUG … … 93 94 DWORD g_VBoxVDbgCfgCreateSwapchainOnDdiOnce = 0; 94 95 96 static void vboxDispLogDbgFormatStringV(char * szBuffer, uint32_t cbBuffer, const char * szString, va_list pArgList) 97 { 98 uint32_t cbWritten = sprintf(szBuffer, "[0x%x.0x%x] Disp: ", GetCurrentProcessId(), GetCurrentThreadId()); 99 if (cbWritten > cbBuffer) 100 { 101 AssertReleaseFailed(); 102 return; 103 } 104 105 _vsnprintf(szBuffer + cbWritten, cbBuffer - cbWritten, szString, pArgList); 106 } 107 95 108 void vboxDispLogDbgPrintF(char * szString, ...) 96 109 { … … 98 111 va_list pArgList; 99 112 va_start(pArgList, szString); 100 _vsnprintf(szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0]), szString, pArgList);113 vboxDispLogDbgFormatStringV(szBuffer, sizeof (szBuffer), szString, pArgList); 101 114 va_end(pArgList); 102 115 103 116 OutputDebugStringA(szBuffer); 104 }105 106 VOID vboxVDbgDoDumpSurfRectByAlloc(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, const RECT *pRect, const char* pSuffix)107 {108 vboxVDbgDoDumpSurfRectByRc(pPrefix, pAlloc->pRc, pAlloc->iAlloc, pRect, pSuffix);109 117 } 110 118 … … 126 134 } 127 135 128 VOID vboxVDbgDoDumpAllocRect(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, const RECT *pRect, const char* pSuffix) 129 { 130 if (pPrefix) 131 { 132 vboxVDbgPrint(("%s", pPrefix)); 133 } 136 typedef struct VBOXVDBG_DUMP_INFO 137 { 138 DWORD fFlags; 139 PVBOXWDDMDISP_ALLOCATION pAlloc; 140 IDirect3DResource9 *pD3DRc; 141 RECT *pRect; 142 } VBOXVDBG_DUMP_INFO, *PVBOXVDBG_DUMP_INFO; 143 144 typedef DECLCALLBACK(void) FNVBOXVDBG_CONTENTS_DUMPER(PVBOXVDBG_DUMP_INFO pInfo, BOOLEAN fBreak, void *pvDumper); 145 typedef FNVBOXVDBG_CONTENTS_DUMPER *PFNVBOXVDBG_CONTENTS_DUMPER; 146 147 static VOID vboxVDbgDoDumpSummary(const char * pPrefix, PVBOXVDBG_DUMP_INFO pInfo, const char * pSuffix) 148 { 149 PVBOXWDDMDISP_ALLOCATION pAlloc = pInfo->pAlloc; 150 IDirect3DResource9 *pD3DRc = pInfo->pD3DRc; 151 char rectBuf[24]; 152 if (pInfo->pRect) 153 _snprintf(rectBuf, sizeof(rectBuf) / sizeof(rectBuf[0]), "(%d:%d);(%d:%d)", 154 pInfo->pRect->left, pInfo->pRect->top, 155 pInfo->pRect->right, pInfo->pRect->bottom); 156 else 157 strcpy(rectBuf, "n/a"); 158 159 vboxVDbgPrint(("%s Sh(0x%p), Rc(0x%p), pAlloc(0x%x), pD3DIf(0x%p), Type(%s), Rect(%s), Locks(%d) %s", 160 pPrefix ? pPrefix : "", 161 pAlloc ? pAlloc->pRc->aAllocations[0].hSharedHandle : NULL, 162 pAlloc ? pAlloc->pRc : NULL, 163 pAlloc, 164 pD3DRc, 165 pD3DRc ? vboxDispLogD3DRcType(pD3DRc->GetType()) : "n/a", 166 rectBuf, 167 pAlloc ? pAlloc->LockInfo.cLocks : 0, 168 pSuffix ? pSuffix : "")); 169 } 170 171 VOID vboxVDbgDoDumpPerform(const char * pPrefix, PVBOXVDBG_DUMP_INFO pInfo, const char * pSuffix, 172 PFNVBOXVDBG_CONTENTS_DUMPER pfnCd, void *pvCd) 173 { 174 DWORD fFlags = pInfo->fFlags; 175 176 if (!VBOXVDBG_DUMP_TYPE_ENABLED(fFlags)) 177 return; 178 179 if (!pInfo->pD3DRc && pInfo->pAlloc) 180 pInfo->pD3DRc = (IDirect3DResource9*)pInfo->pAlloc->pD3DIf; 181 182 BOOLEAN bLogOnly = VBOXVDBG_DUMP_TYPE_FLOW_ONLY(fFlags); 183 if (bLogOnly || !pfnCd) 184 { 185 vboxVDbgDoDumpSummary(pPrefix, pInfo, pSuffix); 186 if (VBOXVDBG_DUMP_FLAGS_IS_SET(fFlags, VBOXVDBG_DUMP_TYPEF_BREAK_ON_FLOW) 187 || (!bLogOnly && VBOXVDBG_DUMP_FLAGS_IS_CLEARED(fFlags, VBOXVDBG_DUMP_TYPEF_DONT_BREAK_ON_CONTENTS))) 188 Assert(0); 189 return; 190 } 191 192 vboxVDbgDoDumpSummary(pPrefix, pInfo, NULL); 193 194 pfnCd(pInfo, VBOXVDBG_DUMP_FLAGS_IS_CLEARED(fFlags, VBOXVDBG_DUMP_TYPEF_DONT_BREAK_ON_CONTENTS), pvCd); 195 196 if (pSuffix && pSuffix[0] != '\0') 197 vboxVDbgPrint(("%s", pSuffix)); 198 } 199 200 static DECLCALLBACK(void) vboxVDbgAllocRectContentsDumperCb(PVBOXVDBG_DUMP_INFO pInfo, BOOLEAN fBreak, void *pvDumper) 201 { 202 PVBOXWDDMDISP_ALLOCATION pAlloc = pInfo->pAlloc; 203 const RECT *pRect = pInfo->pRect; 134 204 135 205 Assert(pAlloc->hAllocation); 136 137 HANDLE hSharedHandle = pAlloc->hSharedHandle;138 139 vboxVDbgPrint(("SharedHandle: (0x%p)\n", hSharedHandle));140 206 141 207 D3DDDICB_LOCK LockData; … … 175 241 Assert(hr == S_OK); 176 242 } 177 if (pSuffix) 178 { 179 vboxVDbgPrint(("%s\n", pSuffix)); 180 } 181 } 182 183 184 VOID vboxVDbgDoDumpSurfRectByRc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const RECT *pRect, const char* pSuffix) 185 { 186 Assert(pRc->cAllocations > iAlloc); 187 BOOL bReleaseSurf = false; 243 } 244 245 VOID vboxVDbgDoDumpAllocRect(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, RECT *pRect, const char* pSuffix, DWORD fFlags) 246 { 247 VBOXVDBG_DUMP_INFO Info; 248 Info.fFlags = fFlags; 249 Info.pAlloc = pAlloc; 250 Info.pD3DRc = NULL; 251 Info.pRect = pRect; 252 vboxVDbgDoDumpPerform(pPrefix, &Info, pSuffix, vboxVDbgAllocRectContentsDumperCb, NULL); 253 } 254 255 static DECLCALLBACK(void) vboxVDbgRcRectContentsDumperCb(PVBOXVDBG_DUMP_INFO pInfo, BOOLEAN fBreak, void *pvDumper) 256 { 257 PVBOXWDDMDISP_ALLOCATION pAlloc = pInfo->pAlloc; 258 IDirect3DResource9 *pD3DRc = pInfo->pD3DRc; 259 const RECT *pRect = pInfo->pRect; 188 260 IDirect3DSurface9 *pSurf; 189 HRESULT hr = vboxWddmSurfGet(pRc, iAlloc, &pSurf); 190 Assert(hr == S_OK); 191 if (hr == S_OK) 192 { 193 vboxVDbgDoDumpSurfRect(pPrefix, pSurf, pRect, pSuffix, true); 194 pSurf->Release(); 195 } 196 } 197 198 VOID vboxVDbgDoDumpSurfRect(const char * pPrefix, IDirect3DSurface9 *pSurf, const RECT *pRect, const char * pSuffix, bool bBreak) 199 { 200 if (pPrefix) 201 { 202 vboxVDbgPrint(("%s", pPrefix)); 261 HRESULT hr = vboxWddmSurfGet(pAlloc->pRc, pAlloc->iAlloc, &pSurf); 262 if (hr != S_OK) 263 { 264 WARN(("vboxWddmSurfGet failed, hr 0x%x", hr)); 265 return; 203 266 } 204 267 205 268 D3DSURFACE_DESC Desc; 206 HRESULThr = pSurf->GetDesc(&Desc);269 hr = pSurf->GetDesc(&Desc); 207 270 Assert(hr == S_OK); 208 271 if (hr == S_OK) … … 224 287 } 225 288 226 if ( bBreak)289 if (fBreak) 227 290 { 228 291 Assert(0); 229 230 hr = pSurf->UnlockRect();231 Assert(hr == S_OK);232 292 } 293 hr = pSurf->UnlockRect(); 294 Assert(hr == S_OK); 233 295 } 234 296 } 235 236 if (pSuffix) 237 { 238 vboxVDbgPrint(("%s", pSuffix)); 239 } 240 } 241 242 VOID vboxVDbgDoDumpSurf(const char * pPrefix, IDirect3DSurface9 *pSurf, const char * pSuffix) 243 { 244 vboxVDbgDoDumpSurfRect(pPrefix, pSurf, NULL, pSuffix, true); 245 } 246 247 VOID vboxVDbgDoDumpBb(const char * pPrefix, IDirect3DSwapChain9 *pSwapchainIf, const char * pSuffix) 297 } 298 299 VOID vboxVDbgDoDumpRcRect(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, 300 IDirect3DResource9 *pD3DRc, RECT *pRect, const char * pSuffix, DWORD fFlags) 301 { 302 VBOXVDBG_DUMP_INFO Info; 303 Info.fFlags = fFlags; 304 Info.pAlloc = pAlloc; 305 Info.pD3DRc = pD3DRc; 306 Info.pRect = pRect; 307 vboxVDbgDoDumpPerform(pPrefix, &Info, pSuffix, vboxVDbgRcRectContentsDumperCb, NULL); 308 } 309 310 VOID vboxVDbgDoDumpBb(const char * pPrefix, IDirect3DSwapChain9 *pSwapchainIf, const char * pSuffix, DWORD fFlags) 248 311 { 249 312 IDirect3DSurface9 *pBb = NULL; … … 256 319 257 320 Assert(pBb); 258 vboxVDbgDoDump Surf(pPrefix, pBb, pSuffix);321 vboxVDbgDoDumpRcRect(pPrefix, NULL, pBb, NULL, pSuffix, fFlags); 259 322 pBb->Release(); 260 323 } 261 324 262 VOID vboxVDbgDoDumpFb(const char * pPrefix, IDirect3DSwapChain9 *pSwapchainIf, const char * pSuffix )325 VOID vboxVDbgDoDumpFb(const char * pPrefix, IDirect3DSwapChain9 *pSwapchainIf, const char * pSuffix, DWORD fFlags) 263 326 { 264 327 IDirect3DSurface9 *pBb = NULL; … … 271 334 272 335 Assert(pBb); 273 vboxVDbgDoDump Surf(pPrefix, pBb, pSuffix);336 vboxVDbgDoDumpRcRect(pPrefix, NULL, pBb, NULL, pSuffix, fFlags); 274 337 pBb->Release(); 275 338 } … … 295 358 } 296 359 297 VOID vboxVDbgDoDumpRcRect(const char * pPrefix, IDirect3DResource9 *pRc, const RECT *pRect, const char * pSuffix) 298 { 299 if (pPrefix) 300 { 301 vboxVDbgPrint(("%s", pPrefix)); 302 } 303 304 switch (pRc->GetType()) 305 { 306 case D3DRTYPE_TEXTURE: 307 { 308 vboxVDbgPrint(("this is a texture\n")); 309 310 IDirect3DTexture9 *pTex = (IDirect3DTexture9*)pRc; 311 IDirect3DSurface9 *pSurf; 312 HRESULT hr = pTex->GetSurfaceLevel(0, &pSurf); 313 Assert(hr == S_OK); 314 if (hr == S_OK) 315 { 316 vboxVDbgDoDumpSurfRect("", pSurf, pRect, "\n", true); 317 pSurf->Release(); 318 } 319 break; 320 } 321 case D3DRTYPE_CUBETEXTURE: 322 { 323 vboxVDbgPrint(("this is a cube texture\n")); 324 325 IDirect3DCubeTexture9 *pCubeTex = (IDirect3DCubeTexture9*)pRc; 326 IDirect3DSurface9 *apSurf[6] = {0}; 327 for (UINT i = D3DCUBEMAP_FACE_POSITIVE_X; i < D3DCUBEMAP_FACE_POSITIVE_X + 6; ++i) 328 { 329 vboxVDbgPrint(("face %s: ", vboxVDbgStrCubeFaceType((D3DCUBEMAP_FACES)i))); 330 331 HRESULT hr = pCubeTex->GetCubeMapSurface((D3DCUBEMAP_FACES)i, 0, &apSurf[i]); 332 Assert(hr == S_OK); 333 if (hr == S_OK) 334 { 335 vboxVDbgDoDumpSurfRect("", apSurf[i], pRect, "\n", false); 336 } 337 else 338 { 339 Assert(0); 340 } 341 } 342 343 Assert(0); 344 345 for (UINT i = D3DCUBEMAP_FACE_POSITIVE_X; i < D3DCUBEMAP_FACE_POSITIVE_X + 6; ++i) 346 { 347 apSurf[i]->UnlockRect(); 348 apSurf[i]->Release(); 349 } 350 351 break; 352 } 353 case D3DRTYPE_SURFACE: 354 { 355 vboxVDbgPrint(("this is a surface\n")); 356 IDirect3DSurface9 *pSurf = (IDirect3DSurface9 *)pRc; 357 vboxVDbgDoDumpSurfRect("", pSurf, pRect, "\n", true); 358 break; 359 } 360 default: 361 vboxVDbgPrint(("unsupported rc type\n")); 362 Assert(0); 363 } 364 365 if (pSuffix) 366 { 367 vboxVDbgPrint(("%s", pSuffix)); 368 } 369 } 370 371 VOID vboxVDbgDoDumpRcRectByAlloc(const char * pPrefix, const PVBOXWDDMDISP_ALLOCATION pAlloc, IDirect3DResource9 *pD3DIf, const RECT *pRect, const char* pSuffix) 372 { 373 if (pPrefix) 374 vboxVDbgPrint(("%s", pPrefix)); 375 376 if (!pD3DIf) 377 { 378 pD3DIf = (IDirect3DResource9*)pAlloc->pD3DIf; 379 } 380 381 vboxVDbgPrint(("Rc(0x%p), pAlloc(0x%x), pD3DIf(0x%p), SharedHandle(0x%p)\n", pAlloc->pRc, pAlloc, pD3DIf, pAlloc->pRc->aAllocations[0].hSharedHandle)); 382 383 vboxVDbgDoDumpRcRect("", pD3DIf, pRect, pSuffix); 384 } 385 386 VOID vboxVDbgDoDumpRcRectByRc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, const RECT *pRect, const char* pSuffix) 387 { 388 vboxVDbgDoDumpRcRectByAlloc(pPrefix, &pRc->aAllocations[0], NULL, pRect, pSuffix); 389 } 390 391 VOID vboxVDbgDoDumpTex(const char * pPrefix, IDirect3DBaseTexture9 *pTexBase, const char * pSuffix) 392 { 393 vboxVDbgDoDumpRcRect(pPrefix, pTexBase, NULL, pSuffix); 394 } 395 396 VOID vboxVDbgDoDumpRt(const char * pPrefix, PVBOXWDDMDISP_DEVICE pDevice, const char * pSuffix) 360 VOID vboxVDbgDoDumpRt(const char * pPrefix, PVBOXWDDMDISP_DEVICE pDevice, const char * pSuffix, DWORD fFlags) 397 361 { 398 362 for (UINT i = 0; i < pDevice->cRTs; ++i) … … 406 370 { 407 371 // Assert(pAlloc->pD3DIf == pRt); 408 vboxVDbgDoDumpRcRect ByAlloc(pPrefix, pAlloc, NULL, NULL, "\n");372 vboxVDbgDoDumpRcRect(pPrefix, pAlloc, NULL, NULL, pSuffix, fFlags); 409 373 pRt->Release(); 410 374 } … … 416 380 } 417 381 418 VOID vboxVDbgDoDumpLockUnlockSurfTex(const char * pPrefix, const PVBOXWDDMDISP_ALLOCATION pAlloc, const char * pSuffix, bool fBreak) 419 { 420 if (pPrefix) 421 { 422 vboxVDbgPrint(("%s", pPrefix)); 423 } 424 425 Assert(!pAlloc->hSharedHandle); 426 382 static DECLCALLBACK(void) vboxVDbgLockUnlockSurfTexContentsDumperCb(PVBOXVDBG_DUMP_INFO pInfo, BOOLEAN fBreak, void *pvDumper) 383 { 384 PVBOXWDDMDISP_ALLOCATION pAlloc = pInfo->pAlloc; 385 PRECT pRect = pInfo->pRect; 427 386 UINT bpp = vboxWddmCalcBitsPerPixel(pAlloc->SurfDesc.format); 428 387 uint32_t width, height, pitch; 388 void *pvData; 389 if (pAlloc->LockInfo.fFlags.AreaValid) 390 { 391 width = pAlloc->LockInfo.Area.left - pAlloc->LockInfo.Area.right; 392 height = pAlloc->LockInfo.Area.bottom - pAlloc->LockInfo.Area.top; 393 } 394 else 395 { 396 width = pAlloc->SurfDesc.width; 397 height = pAlloc->SurfDesc.height; 398 } 399 400 if (pAlloc->LockInfo.fFlags.NotifyOnly) 401 { 402 pitch = pAlloc->SurfDesc.pitch; 403 pvData = ((uint8_t*)pAlloc->pvMem) + pitch*pRect->top + ((bpp*pRect->left) >> 3); 404 } 405 else 406 { 407 pvData = pAlloc->LockInfo.pvData; 408 } 409 410 vboxVDbgDoPrintDumpCmd("Surf Info", pvData, width, height, bpp, pitch); 411 412 if (fBreak) 413 { 414 Assert(0); 415 } 416 } 417 418 VOID vboxVDbgDoDumpLockUnlockSurfTex(const char * pPrefix, const PVBOXWDDMDISP_ALLOCATION pAlloc, const char * pSuffix, DWORD fFlags) 419 { 420 Assert(!pAlloc->hSharedHandle); 421 429 422 RECT Rect, *pRect; 430 void *pvData;431 423 Assert(!pAlloc->LockInfo.fFlags.RangeValid); 432 424 Assert(!pAlloc->LockInfo.fFlags.BoxValid); … … 434 426 { 435 427 pRect = &pAlloc->LockInfo.Area; 436 width = pAlloc->LockInfo.Area.left - pAlloc->LockInfo.Area.right;437 height = pAlloc->LockInfo.Area.bottom - pAlloc->LockInfo.Area.top;438 428 } 439 429 else 440 430 { 441 width = pAlloc->SurfDesc.width;442 height = pAlloc->SurfDesc.height;443 431 Rect.top = 0; 444 Rect.bottom = height;432 Rect.bottom = pAlloc->SurfDesc.height; 445 433 Rect.left = 0; 446 Rect.right = width;434 Rect.right = pAlloc->SurfDesc.width; 447 435 pRect = &Rect; 448 436 } 449 437 450 if (pAlloc->LockInfo.fFlags.NotifyOnly) 451 { 452 pitch = pAlloc->SurfDesc.pitch; 453 pvData = ((uint8_t*)pAlloc->pvMem) + pitch*pRect->top + ((bpp*pRect->left) >> 3); 454 } 455 else 456 { 457 pvData = pAlloc->LockInfo.pvData; 458 } 459 460 vboxVDbgPrint(("pRc(0x%p) iAlloc(%d), type(%d), cLocks(%d)\n", pAlloc->pRc, pAlloc->iAlloc, pAlloc->enmD3DIfType, pAlloc->LockInfo.cLocks)); 461 462 vboxVDbgDoPrintDumpCmd("Surf Info", pvData, width, height, bpp, pitch); 463 464 if (fBreak) 465 { 466 Assert(0); 467 } 468 469 if (pSuffix) 470 { 471 vboxVDbgPrint(("%s", pSuffix)); 472 } 473 474 } 475 476 VOID vboxVDbgDoDumpLockSurfTex(const char * pPrefix, const D3DDDIARG_LOCK* pData, const char * pSuffix, bool fBreak) 438 VBOXVDBG_DUMP_INFO Info; 439 Info.fFlags = fFlags; 440 Info.pAlloc = pAlloc; 441 Info.pD3DRc = NULL; 442 Info.pRect = pRect; 443 vboxVDbgDoDumpPerform(pPrefix, &Info, pSuffix, vboxVDbgLockUnlockSurfTexContentsDumperCb, NULL); 444 } 445 446 VOID vboxVDbgDoDumpLockSurfTex(const char * pPrefix, const D3DDDIARG_LOCK* pData, const char * pSuffix, DWORD fFlags) 477 447 { 478 448 const PVBOXWDDMDISP_RESOURCE pRc = (const PVBOXWDDMDISP_RESOURCE)pData->hResource; 479 449 const PVBOXWDDMDISP_ALLOCATION pAlloc = &pRc->aAllocations[pData->SubResourceIndex]; 480 450 pAlloc->LockInfo.pvData = pData->pSurfData; 481 vboxVDbgDoDumpLockUnlockSurfTex(pPrefix, pAlloc, pSuffix, f Break);482 } 483 484 VOID vboxVDbgDoDumpUnlockSurfTex(const char * pPrefix, const D3DDDIARG_UNLOCK* pData, const char * pSuffix, bool fBreak)451 vboxVDbgDoDumpLockUnlockSurfTex(pPrefix, pAlloc, pSuffix, fFlags); 452 } 453 454 VOID vboxVDbgDoDumpUnlockSurfTex(const char * pPrefix, const D3DDDIARG_UNLOCK* pData, const char * pSuffix, DWORD fFlags) 485 455 { 486 456 const PVBOXWDDMDISP_RESOURCE pRc = (const PVBOXWDDMDISP_RESOURCE)pData->hResource; 487 457 const PVBOXWDDMDISP_ALLOCATION pAlloc = &pRc->aAllocations[pData->SubResourceIndex]; 488 vboxVDbgDoDumpLockUnlockSurfTex(pPrefix, pAlloc, pSuffix, f Break);458 vboxVDbgDoDumpLockUnlockSurfTex(pPrefix, pAlloc, pSuffix, fFlags); 489 459 } 490 460 … … 715 685 716 686 #if defined(VBOXWDDMDISP_DEBUG) || defined(LOG_TO_BACKDOOR_DRV) 717 687 void vboxDispLogDrvF(char * szString, ...) 688 { 689 char szBuffer[4096] = {0}; 690 va_list pArgList; 691 va_start(pArgList, szString); 692 vboxDispLogDbgFormatStringV(szBuffer, sizeof (szBuffer), szString, pArgList); 693 va_end(pArgList); 694 695 VBoxDispMpLoggerLog(szBuffer); 696 } 718 697 #endif -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.h
r41374 r41472 39 39 //# define VBOXWDDMDISP_DEBUG_PRINTDRV 40 40 /* use OutputDebugString */ 41 # define VBOXWDDMDISP_DEBUG_PRINT41 //# define VBOXWDDMDISP_DEBUG_PRINT 42 42 /* adds vectored exception handler to be able to catch non-debug UM exceptions in kernel debugger */ 43 43 //# define VBOXWDDMDISP_DEBUG_VEHANDLER … … 111 111 112 112 #if defined(LOG_TO_BACKDOOR_DRV) || defined(VBOXWDDMDISP_DEBUG_PRINTDRV) 113 # define DbgPrintDrv(_m) do { VBoxDispMpLoggerLogF _m; } while (0)114 # define DbgPrintDrvRel(_m) do { VBoxDispMpLoggerLogF _m; } while (0)115 # define DbgPrintDrvFlow(_m) do { VBoxDispMpLoggerLogF _m; } while (0)113 # define DbgPrintDrv(_m) do { vboxDispLogDrvF _m; } while (0) 114 # define DbgPrintDrvRel(_m) do { vboxDispLogDrvF _m; } while (0) 115 # define DbgPrintDrvFlow(_m) do { vboxDispLogDrvF _m; } while (0) 116 116 #else 117 117 # define DbgPrintDrv(_m) do { } while (0) … … 171 171 #if defined(VBOXWDDMDISP_DEBUG) || defined(LOG_TO_BACKDOOR_DRV) 172 172 173 #define VBOXVDBG_STRCASE(_t) \ 174 case _t: return #_t; 175 #define VBOXVDBG_STRCASE_UNKNOWN() \ 176 default: Assert(0); return "Unknown"; 177 178 static DECLINLINE(const char*) vboxDispLogD3DRcType(D3DRESOURCETYPE enmType) 179 { 180 switch (enmType) 181 { 182 VBOXVDBG_STRCASE(D3DRTYPE_SURFACE); 183 VBOXVDBG_STRCASE(D3DRTYPE_VOLUME); 184 VBOXVDBG_STRCASE(D3DRTYPE_TEXTURE); 185 VBOXVDBG_STRCASE(D3DRTYPE_VOLUMETEXTURE); 186 VBOXVDBG_STRCASE(D3DRTYPE_CUBETEXTURE); 187 VBOXVDBG_STRCASE(D3DRTYPE_VERTEXBUFFER); 188 VBOXVDBG_STRCASE(D3DRTYPE_INDEXBUFFER); 189 VBOXVDBG_STRCASE_UNKNOWN(); 190 } 191 } 192 173 193 #include "VBoxDispMpLogger.h" 174 194 175 195 VBOXDISPMPLOGGER_DECL(void) VBoxDispMpLoggerDumpD3DCAPS9(struct _D3DCAPS9 *pCaps); 196 197 void vboxDispLogDrvF(char * szString, ...); 176 198 177 199 # define vboxDispDumpD3DCAPS9(_pCaps) do { VBoxDispMpLoggerDumpD3DCAPS9(_pCaps); } while (0) … … 187 209 typedef struct VBOXWDDMDISP_RESOURCE *PVBOXWDDMDISP_RESOURCE; 188 210 189 VOID vboxVDbgDoDumpSurfRectByAlloc(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, const RECT *pRect, const char* pSuffix); 190 VOID vboxVDbgDoDumpAllocRect(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, const RECT *pRect, const char* pSuffix); 191 VOID vboxVDbgDoDumpSurfRectByRc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const RECT *pRect, const char* pSuffix); 192 VOID vboxVDbgDoDumpSurfRect(const char * pPrefix, IDirect3DSurface9 *pSurf, const RECT *pRect, const char * pSuffix, bool bBreak); 193 VOID vboxVDbgDoDumpSurf(const char * pPrefix, IDirect3DSurface9 *pSurf, const char * pSuffix); 194 VOID vboxVDbgDoDumpRcRect(const char * pPrefix, IDirect3DResource9 *pRc, const RECT *pRect, const char * pSuffix); 195 VOID vboxVDbgDoDumpRcRectByRc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, const RECT *pRect, const char* pSuffix); 196 VOID vboxVDbgDoDumpRcRectByAlloc(const char * pPrefix, const PVBOXWDDMDISP_ALLOCATION pAlloc, IDirect3DResource9 *pD3DIf, const RECT *pRect, const char* pSuffix); 197 VOID vboxVDbgDoDumpTex(const char * pPrefix, IDirect3DBaseTexture9 *pTexBase, const char * pSuffix); 198 VOID vboxVDbgDoDumpRt(const char * pPrefix, struct VBOXWDDMDISP_DEVICE *pDevice, const char * pSuffix); 199 VOID vboxVDbgDoDumpBb(const char * pPrefix, IDirect3DSwapChain9 *pSwapchainIf, const char * pSuffix); 200 VOID vboxVDbgDoDumpFb(const char * pPrefix, IDirect3DSwapChain9 *pSwapchainIf, const char * pSuffix); 211 /* functions all dump finally comes to */ 212 #define VBOXVDBG_DUMP_TYPEF_FLOW 0x00000001 213 #define VBOXVDBG_DUMP_TYPEF_CONTENTS 0x00000002 214 #define VBOXVDBG_DUMP_TYPEF_DONT_BREAK_ON_CONTENTS 0x00000004 215 #define VBOXVDBG_DUMP_TYPEF_BREAK_ON_FLOW 0x00000008 216 217 #define VBOXVDBG_DUMP_FLAGS_IS_SETANY(_fFlags, _Value) (((_fFlags) & (_Value)) != 0) 218 #define VBOXVDBG_DUMP_FLAGS_IS_SET(_fFlags, _Value) (((_fFlags) & (_Value)) == (_Value)) 219 #define VBOXVDBG_DUMP_FLAGS_IS_CLEARED(_fFlags, _Value) (((_fFlags) & (_Value)) == 0) 220 #define VBOXVDBG_DUMP_FLAGS_CLEAR(_fFlags, _Value) ((_fFlags) & (~(_Value))) 221 #define VBOXVDBG_DUMP_FLAGS_SET(_fFlags, _Value) ((_fFlags) | (_Value)) 222 223 #define VBOXVDBG_DUMP_TYPE_ENABLED(_fFlags) (VBOXVDBG_DUMP_FLAGS_IS_SETANY(_fFlags, VBOXVDBG_DUMP_TYPEF_FLOW | VBOXVDBG_DUMP_TYPEF_CONTENTS)) 224 #define VBOXVDBG_DUMP_TYPE_FLOW_ONLY(_fFlags) (VBOXVDBG_DUMP_FLAGS_IS_SET(_fFlags, VBOXVDBG_DUMP_TYPEF_FLOW) \ 225 && VBOXVDBG_DUMP_FLAGS_IS_CLEARED(_fFlags, VBOXVDBG_DUMP_TYPEF_CONTENTS)) 226 #define VBOXVDBG_DUMP_TYPE_CONTENTS(_fFlags) (VBOXVDBG_DUMP_FLAGS_IS_SET(_fFlags, VBOXVDBG_DUMP_TYPEF_CONTENTS)) 227 #define VBOXVDBG_DUMP_TYPE_GET_FLOW_ONLY(_fFlags) ( \ 228 VBOXVDBG_DUMP_FLAGS_SET( \ 229 VBOXVDBG_DUMP_FLAGS_CLEAR(_fFlags, VBOXVDBG_DUMP_TYPEF_CONTENTS), \ 230 VBOXVDBG_DUMP_TYPEF_FLOW) \ 231 ) 232 233 VOID vboxVDbgDoDumpAllocRect(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, RECT *pRect, const char* pSuffix, DWORD fFlags); 234 VOID vboxVDbgDoDumpRcRect(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, IDirect3DResource9 *pD3DRc, RECT *pRect, const char * pSuffix, DWORD fFlags); 235 VOID vboxVDbgDoDumpLockUnlockSurfTex(const char * pPrefix, const PVBOXWDDMDISP_ALLOCATION pAlloc, const char * pSuffix, DWORD fFlags); 236 /* */ 237 238 VOID vboxVDbgDoDumpRt(const char * pPrefix, struct VBOXWDDMDISP_DEVICE *pDevice, const char * pSuffix, DWORD fFlags); 239 VOID vboxVDbgDoDumpBb(const char * pPrefix, IDirect3DSwapChain9 *pSwapchainIf, const char * pSuffix, DWORD fFlags); 240 VOID vboxVDbgDoDumpFb(const char * pPrefix, IDirect3DSwapChain9 *pSwapchainIf, const char * pSuffix, DWORD fFlags); 201 241 202 242 void vboxVDbgDoPrintRect(const char * pPrefix, const RECT *pRect, const char * pSuffix); 203 243 void vboxVDbgDoPrintAlloc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const char * pSuffix); 204 244 205 VOID vboxVDbgDoDumpLockSurfTex(const char * pPrefix, const D3DDDIARG_LOCK* pData, const char * pSuffix, bool fBreak);206 VOID vboxVDbgDoDumpUnlockSurfTex(const char * pPrefix, const D3DDDIARG_UNLOCK* pData, const char * pSuffix, bool fBreak);245 VOID vboxVDbgDoDumpLockSurfTex(const char * pPrefix, const D3DDDIARG_LOCK* pData, const char * pSuffix, DWORD fFlags); 246 VOID vboxVDbgDoDumpUnlockSurfTex(const char * pPrefix, const D3DDDIARG_UNLOCK* pData, const char * pSuffix, DWORD fFlags); 207 247 208 248 BOOL vboxVDbgDoCheckRectsMatch(const PVBOXWDDMDISP_RESOURCE pDstRc, uint32_t iDstAlloc, … … 227 267 } while (0) 228 268 229 #define VBOXVDBG_IS_DUMP_ALLOWED(_type) ( \ 230 g_VBoxVDbgFDump##_type \ 231 && (g_VBoxVDbgFDump##_type == 1 \ 232 || VBOXVDBG_IS_DUMP_ALLOWED_PID(g_VBoxVDbgFDump##_type) \ 233 ) \ 234 ) 235 236 #define VBOXVDBG_IS_BREAK_ALLOWED(_type) ( \ 237 g_VBoxVDbgFBreak##_type \ 238 && (g_VBoxVDbgFBreak##_type == 1 \ 239 || VBOXVDBG_IS_DUMP_ALLOWED_PID(g_VBoxVDbgFBreak##_type) \ 240 ) \ 241 ) 242 243 #define VBOXVDBG_IS_CHECK_ALLOWED(_type) ( \ 244 g_VBoxVDbgFCheck##_type \ 245 && (g_VBoxVDbgFCheck##_type == 1 \ 246 || VBOXVDBG_IS_DUMP_ALLOWED_PID(g_VBoxVDbgFCheck##_type) \ 247 ) \ 248 ) 269 #define VBOXVDBG_DUMP_FLAGS_FOR_TYPE(_type) g_VBoxVDbgFDump##_type 270 #define VBOXVDBG_BREAK_FLAGS_FOR_TYPE(_type) g_VBoxVDbgFBreak##_type 271 #define VBOXVDBG_CHECK_FLAGS_FOR_TYPE(_type) g_VBoxVDbgFCheck##_type 272 #define VBOXVDBG_IS_DUMP_ALLOWED(_type) ( VBOXVDBG_DUMP_TYPE_ENABLED(VBOXVDBG_DUMP_FLAGS_FOR_TYPE(_type)) ) 273 274 #define VBOXVDBG_IS_BREAK_ALLOWED(_type) ( !!VBOXVDBG_BREAK_FLAGS_FOR_TYPE(_type) ) 275 276 #define VBOXVDBG_IS_CHECK_ALLOWED(_type) ( !!VBOXVDBG_CHECK_FLAGS_FOR_TYPE(_type) ) 249 277 250 278 #define VBOXVDBG_IS_DUMP_SHARED_ALLOWED(_pRc) (\ … … 318 346 Assert(i < RT_ELEMENTS((_pDevice)->aSamplerTextures)); \ 319 347 if (!(_pDevice)->aSamplerTextures[i]) continue; \ 348 ++iSampler; \ 349 if (!(_pDevice)->aSamplerTextures[i]->RcDesc.fFlags.SharedResource) continue; \ 320 350 *(_pIsShared) = TRUE; break; \ 321 ++iSampler; \322 351 } \ 323 352 } \ … … 346 375 || VBOXVDBG_IS_DUMP_ALLOWED(DrawPrim)) \ 347 376 { \ 348 vboxVDbgDoDumpRt("==>"__FUNCTION__": R enderTarget Dump\n", (_pDevice), "\n"); \377 vboxVDbgDoDumpRt("==>"__FUNCTION__": Rt: ", (_pDevice), "", VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Flush) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(DrawPrim)); \ 349 378 }\ 350 379 } while (0) … … 356 385 || VBOXVDBG_IS_DUMP_ALLOWED(DrawPrim)) \ 357 386 { \ 358 vboxVDbgDoDumpRt("<=="__FUNCTION__": RenderTarget Dump\n", (_pDevice), "\n"); \ 387 vboxVDbgDoDumpRt("<=="__FUNCTION__": Rt: ", (_pDevice), "", \ 388 VBOXVDBG_DUMP_FLAGS_FOR_TYPE(DrawPrim) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared)); \ 359 389 }\ 360 390 } while (0) … … 374 404 ) \ 375 405 { \ 376 vboxVDbgDoDumpRcRectByRc("== "__FUNCTION__": ", _pRc, NULL, "\n"); \ 406 vboxVDbgDoDumpRcRect("== "__FUNCTION__": ", &(_pRc)->aAllocations[0], NULL, NULL, "", \ 407 VBOXVDBG_DUMP_FLAGS_FOR_TYPE(SetTexture) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared)); \ 377 408 } \ 378 409 } while (0) … … 384 415 ) \ 385 416 { \ 417 RECT SrcRect = *(_pSrcRect); \ 386 418 RECT _DstRect; \ 387 vboxWddmRectMoved(&_DstRect, (_pSrcRect), (_pDstPoint)->x, (_pDstPoint)->y); \ 388 vboxVDbgDoDumpRcRectByRc("==>"__FUNCTION__" Src: ", (_pSrcRc), (_pSrcRect), "\n"); \ 389 vboxVDbgDoDumpRcRectByRc("==>"__FUNCTION__" Dst: ", (_pDstRc), &_DstRect, "\n"); \ 419 vboxWddmRectMoved(&_DstRect, &SrcRect, (_pDstPoint)->x, (_pDstPoint)->y); \ 420 vboxVDbgDoDumpRcRect("==> "__FUNCTION__": Src: ", &(_pSrcRc)->aAllocations[0], NULL, &SrcRect, "", \ 421 VBOXVDBG_DUMP_FLAGS_FOR_TYPE(TexBlt) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared)); \ 422 vboxVDbgDoDumpRcRect("==> "__FUNCTION__": Dst: ", &(_pDstRc)->aAllocations[0], NULL, &_DstRect, "", \ 423 VBOXVDBG_DUMP_FLAGS_FOR_TYPE(TexBlt) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared)); \ 390 424 } \ 391 425 } while (0) … … 398 432 ) \ 399 433 { \ 434 RECT SrcRect = *(_pSrcRect); \ 400 435 RECT _DstRect; \ 401 vboxWddmRectMoved(&_DstRect, (_pSrcRect), (_pDstPoint)->x, (_pDstPoint)->y); \ 402 vboxVDbgDoDumpRcRectByRc("<=="__FUNCTION__" Src: ", (_pSrcRc), (_pSrcRect), "\n"); \ 403 vboxVDbgDoDumpRcRectByRc("<=="__FUNCTION__" Dst: ", (_pDstRc), &_DstRect, "\n"); \ 436 vboxWddmRectMoved(&_DstRect, &SrcRect, (_pDstPoint)->x, (_pDstPoint)->y); \ 437 vboxVDbgDoDumpRcRect("<== "__FUNCTION__": Src: ", &(_pSrcRc)->aAllocations[0], NULL, &SrcRect, "", \ 438 VBOXVDBG_DUMP_FLAGS_FOR_TYPE(TexBlt) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared)); \ 439 vboxVDbgDoDumpRcRect("<== "__FUNCTION__": Dst: ", &(_pDstRc)->aAllocations[0], NULL, &_DstRect, "", \ 440 VBOXVDBG_DUMP_FLAGS_FOR_TYPE(TexBlt) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared)); \ 404 441 } \ 405 442 } while (0) … … 411 448 ) \ 412 449 { \ 413 if ((_pSrcSurf) == (_pDstSurf) \ 450 DWORD fFlags = VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Blt) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared); \ 451 if (VBOXVDBG_DUMP_TYPE_CONTENTS(fFlags) && \ 452 ((_pSrcSurf) == (_pDstSurf) \ 414 453 && ( ((_pSrcRect) && (_pDstRect) && !memcmp((_pSrcRect), (_pDstRect), sizeof (_pDstRect))) \ 415 454 || ((_pSrcRect) == (_pDstRect)) \ 416 ) ) \455 )) ) \ 417 456 { \ 418 vboxVDbgPrint((_str #_type ": skipping dump of the same rect for one surfcace\n")); \ 457 vboxVDbgPrint((_str #_type ": skipping content dump of the same rect for one surfcace\n")); \ 458 fFlags = VBOXVDBG_DUMP_TYPE_GET_FLOW_ONLY(fFlags); \ 459 } \ 460 RECT Rect, *pRect; \ 461 if (_pSrcRect) \ 462 { \ 463 Rect = *((RECT*)(_pSrcRect)); \ 464 pRect = &Rect; \ 419 465 } \ 420 466 else \ 467 pRect = NULL; \ 468 vboxVDbgDoDumpRcRect(_str __FUNCTION__" Src: ", (_pSrcAlloc), (_pSrcSurf), pRect, "", \ 469 VBOXVDBG_DUMP_FLAGS_FOR_TYPE(_type) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared)); \ 470 if (_pDstRect) \ 421 471 { \ 422 vboxVDbgDoDumpRcRectByAlloc(_str __FUNCTION__" Src: ", (_pSrcAlloc), (_pSrcSurf), (_pSrcRect), "\n"); \ 423 vboxVDbgDoDumpRcRectByAlloc(_str __FUNCTION__" Dst: ", (_pDstAlloc), (_pDstSurf), (_pDstRect), "\n"); \ 424 } \ 472 Rect = *((RECT*)(_pDstRect)); \ 473 pRect = &Rect; \ 474 } \ 475 else \ 476 pRect = NULL; \ 477 vboxVDbgDoDumpRcRect(_str __FUNCTION__" Dst: ", (_pDstAlloc), (_pDstSurf), pRect, "", \ 478 VBOXVDBG_DUMP_FLAGS_FOR_TYPE(_type) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared)); \ 425 479 } \ 426 480 } while (0) … … 510 564 if (VBOXVDBG_IS_DUMP_ALLOWED(RtSynch)) \ 511 565 { \ 512 vboxVDbgDoDump SurfRect("== "__FUNCTION__" Bb:\n", (_pBbSurf), NULL, "\n", true); \566 vboxVDbgDoDumpRcRect("== "__FUNCTION__" Bb:\n", NULL, (_pBbSurf), NULL, "", VBOXVDBG_DUMP_FLAGS_FOR_TYPE(RtSynch)); \ 513 567 } \ 514 568 } while (0) … … 517 571 if (VBOXVDBG_IS_DUMP_ALLOWED(PresentEnter)) { \ 518 572 if (!(_pSwapchain)->fFlags.bRtReportingPresent) { \ 519 vboxVDbgDoDumpBb("==>"__FUNCTION__" Bb:\n", (_pSwapchain)->pSwapChainIf, " \n"); \573 vboxVDbgDoDumpBb("==>"__FUNCTION__" Bb:\n", (_pSwapchain)->pSwapChainIf, "", VBOXVDBG_DUMP_FLAGS_FOR_TYPE(PresentEnter)); \ 520 574 } \ 521 575 else { \ … … 524 578 HRESULT hr = vboxWddmSwapchainSurfGet(_pDevice, _pSwapchain, pCurBb, &pSurf); \ 525 579 Assert(hr == S_OK); \ 526 vboxVDbgDoDump Surf("== "__FUNCTION__" Bb:\n", pSurf, "\n"); \580 vboxVDbgDoDumpRcRect("== "__FUNCTION__" Bb:\n", pCurBb, pSurf, NULL, "", VBOXVDBG_DUMP_FLAGS_FOR_TYPE(PresentEnter)); \ 527 581 pSurf->Release(); \ 528 582 } \ … … 533 587 if (VBOXVDBG_IS_DUMP_ALLOWED(PresentLeave)) { \ 534 588 if (!(_pSwapchain)->fFlags.bRtReportingPresent) { \ 535 vboxVDbgDoDumpFb("<=="__FUNCTION__" Fb:\n", (_pSwapchain)->pSwapChainIf, " \n"); \589 vboxVDbgDoDumpFb("<=="__FUNCTION__" Fb:\n", (_pSwapchain)->pSwapChainIf, "", VBOXVDBG_DUMP_FLAGS_FOR_TYPE(PresentLeave)); \ 536 590 } \ 537 591 else { \ … … 545 599 if (VBOXVDBG_IS_DUMP_ALLOWED(Flush)) \ 546 600 { \ 547 vboxVDbgDoDumpRt("== "__FUNCTION__": RenderTarget Dump\n", (_pDevice), "\n"); \ 601 vboxVDbgDoDumpRt("== "__FUNCTION__": Rt: ", (_pDevice), "", \ 602 VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Flush)); \ 548 603 }\ 549 604 } while (0) … … 554 609 ) \ 555 610 { \ 556 vboxVDbgDoDumpLockSurfTex("== "__FUNCTION__": ", (_pData), " \n", VBOXVDBG_IS_DUMP_ALLOWED(Lock)); \611 vboxVDbgDoDumpLockSurfTex("== "__FUNCTION__": ", (_pData), "", VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Lock)); \ 557 612 } \ 558 613 } while (0) … … 562 617 ) \ 563 618 { \ 564 vboxVDbgDoDumpUnlockSurfTex("== "__FUNCTION__": ", (_pData), " \n", true); \619 vboxVDbgDoDumpUnlockSurfTex("== "__FUNCTION__": ", (_pData), "", VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Unlock)); \ 565 620 } \ 566 621 } while (0)
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器