Changeset 39819 in vbox for trunk/src/VBox/Additions/WINNT/Graphics
- Timestamp:
- Jan 20, 2012 1:12:27 PM (13 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.cpp
r39587 r39819 108 108 #define VBOXDISP_DDI_PROLOGUE() \ 109 109 VBOXVDBG_BREAK_DDI(); \ 110 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 110 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); \ 111 VBOXVDBG_CREATE_CHECK_SWAPCHAIN(); 111 112 112 113 #ifdef VBOXDISPMP_TEST … … 2197 2198 Assert(iBb != (~0)); 2198 2199 #endif 2199 hr = pDevice->pDevice9If->StretchRect(pD3D9OldSurf, NULL, pD3D9Surf, NULL, D3DTEXF_NONE);2200 Assert(hr == S_OK);2200 VBOXVDBG_CHECK_SWAPCHAIN_SYNC(hr = pDevice->pDevice9If->StretchRect(pD3D9OldSurf, NULL, pD3D9Surf, NULL, D3DTEXF_NONE); Assert(hr == S_OK), 2201 pAlloc, pD3D9OldSurf, NULL, pAlloc, pD3D9Surf, NULL); 2201 2202 } 2202 2203 } … … 2256 2257 pSwapchain->bRTFbCopyUpToDate = TRUE; 2257 2258 # ifndef VBOX_WINE_WITH_FAST_INTERSWAPCHAIN_BLT 2258 tmpHr = pDevice->pDevice9If->StretchRect(pD3D9Bb, NULL, (IDirect3DSurface9*)vboxWddmSwapchainGetBb(pSwapchain)->pAlloc->pD3DIf, NULL, D3DTEXF_NONE); 2259 VBOXVDBG_CHECK_SWAPCHAIN_SYNC(tmpHr = pDevice->pDevice9If->StretchRect(pD3D9Bb, NULL, (IDirect3DSurface9*)vboxWddmSwapchainGetBb(pSwapchain)->pAlloc->pD3DIf, NULL, D3DTEXF_NONE); Assert(tmpHr == S_OK), 2260 pAlloc, pD3D9Bb, NULL, pAlloc, (IDirect3DSurface9*)vboxWddmSwapchainGetBb(pSwapchain)->pAlloc->pD3DIf, NULL); 2261 2259 2262 if (FAILED(tmpHr)) 2260 2263 { … … 2341 2344 if (pRT->pAlloc->enmD3DIfType != VBOXDISP_D3DIFTYPE_SURFACE) 2342 2345 continue; 2343 BOOL fHasSurf = !!pRT->pAlloc->pRc->aAllocations[0].pD3DIf; 2346 BOOL fHasSurf = pRT->pAlloc->enmD3DIfType == VBOXDISP_D3DIFTYPE_SURFACE ? 2347 !!pRT->pAlloc->pRc->aAllocations[i].pD3DIf 2348 : 2349 !!pRT->pAlloc->pRc->aAllocations[0].pD3DIf; 2344 2350 if (!fForceCreate && !fHasSurf) 2345 2351 continue; … … 2395 2401 if (pD3D9OldSurf != pD3D9OldFb) 2396 2402 { 2397 hr = pDevice9If->StretchRect(pD3D9OldSurf, NULL, pD3D9NewSurf, NULL, D3DTEXF_NONE);2398 Assert(hr == S_OK);2403 VBOXVDBG_CHECK_SWAPCHAIN_SYNC(hr = pDevice9If->StretchRect(pD3D9OldSurf, NULL, pD3D9NewSurf, NULL, D3DTEXF_NONE); Assert(hr == S_OK), 2404 pRT->pAlloc, pD3D9OldSurf, NULL, pRT->pAlloc, pD3D9NewSurf, NULL); 2399 2405 } 2400 2406 else … … 2410 2416 break; 2411 2417 } 2418 2419 Assert(pRT->pAlloc->enmD3DIfType == VBOXDISP_D3DIFTYPE_SURFACE); 2412 2420 2413 2421 if (pRT->pAlloc->pD3DIf) … … 2887 2895 { 2888 2896 HRESULT hr; 2897 2898 VBOXVDBG_DUMP_PRESENT_ENTER(pDevice, pSwapchain); 2899 2889 2900 if (!pSwapchain->fFlags.bRtReportingPresent) 2890 2901 { … … 2909 2920 } 2910 2921 2922 VBOXVDBG_DUMP_PRESENT_LEAVE(pDevice, pSwapchain); 2923 2911 2924 pSwapchain->bRTFbCopyUpToDate = FALSE; 2912 2925 vboxWddmSwapchainFlip(pSwapchain); … … 3044 3057 if (pDevice->pDevice9If) 3045 3058 return pDevice->pDevice9If; 3059 3060 #ifdef VBOXWDDMDISP_DEBUG 3061 g_VBoxVDbgInternalDevice = pDevice; 3062 #endif 3063 3046 3064 HRESULT hr = vboxWddmD3DDeviceCreateDummy(pDevice); 3047 3065 Assert(hr == S_OK); … … 3174 3192 return hr; 3175 3193 } 3194 3195 #if 0 3196 pCaps->RasterCaps |= D3DPRASTERCAPS_FOGRANGE; 3197 pCaps->MaxTextureWidth = 8192; // 4096 3198 pCaps->MaxTextureHeight = 8192; // 4096 3199 pCaps->MaxVolumeExtent = 2048; // 512 3200 pCaps->MaxTextureAspectRatio = 8192; // 4096 3201 pCaps->MaxUserClipPlanes = 8; // 6 3202 pCaps->MaxPointSize = 63.000000; // 64.000000 3203 #endif 3176 3204 3177 3205 vboxDispDumpD3DCAPS9(pCaps); … … 5338 5366 bIssueCreateResource = true; 5339 5367 Assert(pResource->SurfCount); 5368 5369 #ifdef VBOXWDDMDISP_DEBUG 5370 if (g_VBoxVDbgCfgForceDummyDevCreate) 5371 { 5372 VBOXDISP_D3DEV(pDevice); 5373 Assert(!RTListIsEmpty(&pDevice->SwapchainList)); 5374 g_VBoxVDbgInternalRc = pRc; 5375 } 5376 #endif 5377 5340 5378 if (RTListIsEmpty(&pDevice->SwapchainList)) 5341 5379 { … … 5546 5584 hr = vboxWddmSwapchainCreateIfForRc(pDevice, pRc, &pSwapchain); 5547 5585 Assert(hr == S_OK); 5586 } 5587 else 5588 { 5589 VBOXVDBG_CREATE_CHECK_SWAPCHAIN(); 5548 5590 } 5549 5591 } … … 7324 7366 vboxVDbgPrint(("==> "__FUNCTION__"\n")); 7325 7367 7368 #ifdef DEBUG_misha 7369 DWORD dwVersion = 0; 7370 DWORD dwMajorVersion = 0; 7371 DWORD dwMinorVersion = 0; 7372 dwVersion = GetVersion(); 7373 dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion))); 7374 dwMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion))); 7375 7376 if (dwMajorVersion == 6 && dwMinorVersion <= 1 && VBOXVDBG_IS_DWM()) 7377 { 7378 exit(0); 7379 return E_FAIL; 7380 } 7381 #endif 7382 7326 7383 // vboxDispLock(); 7327 7384 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.h
r39515 r39819 33 33 /* maximum number of direct render targets to be used before 34 34 * switching to offscreen rendering */ 35 #ifdef DEBUG_misha36 # define VBOXWDDMDISP_MAX_DIRECT_RTS 035 #ifdef VBOXWDDMDISP_DEBUG 36 # define VBOXWDDMDISP_MAX_DIRECT_RTS g_VBoxVDbgCfgMaxDirectRts 37 37 #else 38 # define VBOXWDDMDISP_MAX_DIRECT_RTS 338 # define VBOXWDDMDISP_MAX_DIRECT_RTS 3 39 39 #endif 40 40 … … 139 139 UINT bRtReportingPresent : 1; /* use VBox extension method for performing present */ 140 140 UINT bSwitchReportingPresent : 1; /* switch to use VBox extension method for performing present on next present */ 141 UINT Reserved : 30;141 UINT Reserved : 29; 142 142 }; 143 143 uint32_t Value; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.cpp
r39160 r39819 60 60 DWORD g_VBoxVDbgFDumpLock = VBOXWDDMDISP_DEBUG_DUMP_DEFAULT; 61 61 DWORD g_VBoxVDbgFDumpUnlock = VBOXWDDMDISP_DEBUG_DUMP_DEFAULT; 62 DWORD g_VBoxVDbgFDumpPresentEnter = VBOXWDDMDISP_DEBUG_DUMP_DEFAULT; 63 DWORD g_VBoxVDbgFDumpPresentLeave = VBOXWDDMDISP_DEBUG_DUMP_DEFAULT; 64 DWORD g_VBoxVDbgFDumpScSync = VBOXWDDMDISP_DEBUG_DUMP_DEFAULT; 62 65 63 66 DWORD g_VBoxVDbgFBreakShared = VBOXWDDMDISP_DEBUG_DUMP_DEFAULT; … … 67 70 DWORD g_VBoxVDbgFCheckBlt = 0; 68 71 DWORD g_VBoxVDbgFCheckTexBlt = 0; 72 DWORD g_VBoxVDbgFCheckScSync = 0; 69 73 70 74 DWORD g_VBoxVDbgFSkipCheckTexBltDwmWndUpdate = 1; … … 80 84 81 85 DWORD g_VBoxVDbgPid = 0; 86 87 DWORD g_VBoxVDbgCfgMaxDirectRts = 0; 88 DWORD g_VBoxVDbgCfgForceDummyDevCreate = 0; 89 90 PVBOXWDDMDISP_DEVICE g_VBoxVDbgInternalDevice = NULL; 91 PVBOXWDDMDISP_RESOURCE g_VBoxVDbgInternalRc = NULL; 92 93 DWORD g_VBoxVDbgCfgCreateSwapchainOnDdiOnce = 0; 82 94 83 95 void vboxDispLogDbgPrintF(char * szString, ...) … … 232 244 vboxVDbgDoDumpSurfRect(pPrefix, pSurf, NULL, pSuffix, true); 233 245 } 246 247 VOID vboxVDbgDoDumpBb(const char * pPrefix, IDirect3DSwapChain9 *pSwapchainIf, const char * pSuffix) 248 { 249 IDirect3DSurface9 *pBb = NULL; 250 HRESULT hr = pSwapchainIf->GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO, &pBb); 251 Assert(hr == S_OK); 252 if (FAILED(hr)) 253 { 254 return; 255 } 256 257 Assert(pBb); 258 vboxVDbgDoDumpSurf(pPrefix, pBb, pSuffix); 259 pBb->Release(); 260 } 261 262 VOID vboxVDbgDoDumpFb(const char * pPrefix, IDirect3DSwapChain9 *pSwapchainIf, const char * pSuffix) 263 { 264 IDirect3DSurface9 *pBb = NULL; 265 HRESULT hr = pSwapchainIf->GetBackBuffer(-1, D3DBACKBUFFER_TYPE_MONO, &pBb); 266 Assert(hr == S_OK); 267 if (FAILED(hr)) 268 { 269 return; 270 } 271 272 Assert(pBb); 273 vboxVDbgDoDumpSurf(pPrefix, pBb, pSuffix); 274 pBb->Release(); 275 } 276 234 277 235 278 #define VBOXVDBG_STRCASE(_t) \ -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.h
r39606 r39819 56 56 extern DWORD g_VBoxVDbgFDumpLock; 57 57 extern DWORD g_VBoxVDbgFDumpUnlock; 58 extern DWORD g_VBoxVDbgFDumpPresentEnter; 59 extern DWORD g_VBoxVDbgFDumpPresentLeave; 60 extern DWORD g_VBoxVDbgFDumpScSync; 58 61 59 62 extern DWORD g_VBoxVDbgFBreakShared; … … 63 66 extern DWORD g_VBoxVDbgFCheckBlt; 64 67 extern DWORD g_VBoxVDbgFCheckTexBlt; 68 extern DWORD g_VBoxVDbgFCheckScSync; 65 69 66 70 extern DWORD g_VBoxVDbgFSkipCheckTexBltDwmWndUpdate; … … 75 79 76 80 extern LONG g_VBoxVDbgFIsDwm; 81 82 extern DWORD g_VBoxVDbgCfgMaxDirectRts; 83 extern DWORD g_VBoxVDbgCfgForceDummyDevCreate; 84 85 extern struct VBOXWDDMDISP_DEVICE *g_VBoxVDbgInternalDevice; 86 extern struct VBOXWDDMDISP_RESOURCE *g_VBoxVDbgInternalRc; 87 88 extern DWORD g_VBoxVDbgCfgCreateSwapchainOnDdiOnce; 77 89 78 90 #endif … … 185 197 VOID vboxVDbgDoDumpTex(const char * pPrefix, IDirect3DBaseTexture9 *pTexBase, const char * pSuffix); 186 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); 187 201 188 202 void vboxVDbgDoPrintRect(const char * pPrefix, const RECT *pRect, const char * pSuffix); … … 366 380 } while (0) 367 381 368 #define VBOXVDBG_DUMP_ BLT_ENTER(_pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) do { \369 if (VBOXVDBG_IS_DUMP_ALLOWED( Blt) \382 #define VBOXVDBG_DUMP_STRETCH_RECT(_type, _str, _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) do { \ 383 if (VBOXVDBG_IS_DUMP_ALLOWED(_type) \ 370 384 || VBOXVDBG_IS_DUMP_SHARED_ALLOWED((_pSrcAlloc)->pRc) \ 371 385 || VBOXVDBG_IS_DUMP_SHARED_ALLOWED((_pDstAlloc)->pRc) \ 372 386 ) \ 373 387 { \ 374 if ((_pSrcAlloc) == (_pDstAlloc) && !memcmp((_pSrcRect), (_pDstRect), sizeof (_pDstRect))) \ 388 if ((_pSrcSurf) == (_pDstSurf) \ 389 && ( ((_pSrcRect) && (_pDstRect) && !memcmp((_pSrcRect), (_pDstRect), sizeof (_pDstRect))) \ 390 || ((_pSrcRect) == (_pDstRect)) \ 391 ) ) \ 375 392 { \ 376 vboxVDbgPrint(( "BLT_ENTER: skipping dump of the same rect for one surfcace\n")); \393 vboxVDbgPrint((_str #_type ": skipping dump of the same rect for one surfcace\n")); \ 377 394 } \ 378 395 else \ 379 396 { \ 380 vboxVDbgDoDumpRcRectByAlloc("==>"__FUNCTION__" Src: ", (_pSrcAlloc), (_pSrcSurf), (_pSrcRect), "\n"); \ 381 vboxVDbgDoDumpRcRectByAlloc("==>"__FUNCTION__" Dst: ", (_pDstAlloc), (_pDstSurf), (_pDstRect), "\n"); \ 382 } \ 383 } \ 384 } while (0) 385 386 #define VBOXVDBG_DUMP_BLT_LEAVE(_pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) do { \ 387 if (VBOXVDBG_DUMP_RECTS_FORCED() \ 388 || VBOXVDBG_IS_DUMP_ALLOWED(Blt) \ 389 || VBOXVDBG_IS_DUMP_SHARED_ALLOWED((_pSrcAlloc)->pRc) \ 390 || VBOXVDBG_IS_DUMP_SHARED_ALLOWED((_pDstAlloc)->pRc) \ 391 ) \ 392 { \ 393 if ((_pSrcAlloc) == (_pDstAlloc) && !memcmp((_pSrcRect), (_pDstRect), sizeof (_pDstRect))) \ 394 { \ 395 vboxVDbgPrint(("BLT_LEAVE: skipping dump of the same rect for one surfcace\n")); \ 396 } \ 397 else \ 398 { \ 399 vboxVDbgDoDumpRcRectByAlloc("<=="__FUNCTION__" Src: ", (_pSrcAlloc), (_pSrcSurf), (_pSrcRect), "\n"); \ 400 vboxVDbgDoDumpRcRectByAlloc("<=="__FUNCTION__" Dst: ", (_pDstAlloc), (_pDstSurf), (_pDstRect), "\n"); \ 401 } \ 402 } \ 403 } while (0) 397 vboxVDbgDoDumpRcRectByAlloc(_str __FUNCTION__" Src: ", (_pSrcAlloc), (_pSrcSurf), (_pSrcRect), "\n"); \ 398 vboxVDbgDoDumpRcRectByAlloc(_str __FUNCTION__" Dst: ", (_pDstAlloc), (_pDstSurf), (_pDstRect), "\n"); \ 399 } \ 400 } \ 401 } while (0) 402 403 #define VBOXVDBG_DUMP_BLT_ENTER(_pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) \ 404 VBOXVDBG_DUMP_STRETCH_RECT(Blt, "==>", _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) 405 406 #define VBOXVDBG_DUMP_BLT_LEAVE(_pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) \ 407 VBOXVDBG_DUMP_STRETCH_RECT(Blt, "<==", _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) 408 409 #define VBOXVDBG_DUMP_SWAPCHAIN_SYNC_ENTER(_pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) \ 410 VBOXVDBG_DUMP_STRETCH_RECT(ScSync, "==>", _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) 411 412 #define VBOXVDBG_DUMP_SWAPCHAIN_SYNC_LEAVE(_pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) \ 413 VBOXVDBG_DUMP_STRETCH_RECT(ScSync, "<==", _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) 404 414 405 415 #define VBOXVDBG_IS_SKIP_DWM_WND_UPDATE(_pSrcRc, _pSrcRect, _pDstRc, _pDstPoint) ( \ … … 448 458 } while (0) 449 459 450 #define VBOXVDBG_CHECK_ BLT(_opBlt, _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) do { \451 if (VBOXVDBG_IS_CHECK_ALLOWED( Blt)) { \460 #define VBOXVDBG_CHECK_STRETCH_RECT(_type, _op, _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) do { \ 461 if (VBOXVDBG_IS_CHECK_ALLOWED(_type)) { \ 452 462 VBOXVDBG_CHECK_RECTS(\ 453 VBOXVDBG_DUMP_ BLT_ENTER(_pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect); \454 _op Blt,\455 VBOXVDBG_DUMP_ BLT_LEAVE(_pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect), \456 "Blt", \463 VBOXVDBG_DUMP_STRETCH_RECT(_type, "==>", _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect); \ 464 _op ,\ 465 VBOXVDBG_DUMP_STRETCH_RECT(_type, "<==", _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect), \ 466 #_type , \ 457 467 _pDstAlloc->pRc, _pDstAlloc->iAlloc, _pSrcAlloc->pRc, _pSrcAlloc->iAlloc, _pDstRect, _pSrcRect); \ 458 468 } \ … … 460 470 { \ 461 471 VBOXVDBG_DUMP_RECTS_INIT(0); \ 462 VBOXVDBG_DUMP_BLT_ENTER(_pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect); \ 463 _opBlt;\ 464 VBOXVDBG_DUMP_BLT_LEAVE(_pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect); \ 465 } \ 466 } while (0) 472 VBOXVDBG_DUMP_STRETCH_RECT(_type, "==>", _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect); \ 473 _op;\ 474 VBOXVDBG_DUMP_STRETCH_RECT(_type, "<==", _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect); \ 475 } \ 476 } while (0) 477 478 #define VBOXVDBG_CHECK_BLT(_opBlt, _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) \ 479 VBOXVDBG_CHECK_STRETCH_RECT(Blt, _opBlt, _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) 480 481 #define VBOXVDBG_CHECK_SWAPCHAIN_SYNC(_op, _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) \ 482 VBOXVDBG_CHECK_STRETCH_RECT(ScSync, _op, _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) 467 483 468 484 #define VBOXVDBG_DUMP_SYNC_RT(_pBbSurf) do { \ … … 472 488 } \ 473 489 } while (0) 490 491 #define VBOXVDBG_DUMP_PRESENT_ENTER(_pDevice, _pSwapchain) do { \ 492 if (VBOXVDBG_IS_DUMP_ALLOWED(PresentEnter)) { \ 493 if (!(_pSwapchain)->fFlags.bRtReportingPresent) { \ 494 vboxVDbgDoDumpBb("==>"__FUNCTION__" Bb:\n", (_pSwapchain)->pSwapChainIf, "\n"); \ 495 } \ 496 else { \ 497 PVBOXWDDMDISP_ALLOCATION pCurBb = vboxWddmSwapchainGetBb((_pSwapchain))->pAlloc; \ 498 IDirect3DSurface9 *pSurf; \ 499 HRESULT hr = vboxWddmSwapchainSurfGet(_pDevice, _pSwapchain, pCurBb, &pSurf); \ 500 Assert(hr == S_OK); \ 501 vboxVDbgDoDumpSurf("== "__FUNCTION__" Bb:\n", pSurf, "\n"); \ 502 pSurf->Release(); \ 503 } \ 504 } \ 505 } while (0) 506 507 #define VBOXVDBG_DUMP_PRESENT_LEAVE(_pDevice, _pSwapchain) do { \ 508 if (VBOXVDBG_IS_DUMP_ALLOWED(PresentLeave)) { \ 509 if (!(_pSwapchain)->fFlags.bRtReportingPresent) { \ 510 vboxVDbgDoDumpFb("<=="__FUNCTION__" Fb:\n", (_pSwapchain)->pSwapChainIf, "\n"); \ 511 } \ 512 else { \ 513 vboxVDbgPrint(("PRESENT_LEAVE: unsupported for Rt Reporting mode\n")); \ 514 } \ 515 } \ 516 } while (0) 517 474 518 475 519 #define VBOXVDBG_DUMP_FLUSH(_pDevice) do { \ … … 496 540 } \ 497 541 } while (0) 542 543 544 #define VBOXVDBG_CREATE_CHECK_SWAPCHAIN() do { \ 545 if (g_VBoxVDbgCfgCreateSwapchainOnDdiOnce && g_VBoxVDbgInternalRc) { \ 546 PVBOXWDDMDISP_SWAPCHAIN pSwapchain; \ 547 HRESULT hr = vboxWddmSwapchainCreateIfForRc(g_VBoxVDbgInternalDevice, g_VBoxVDbgInternalRc, &pSwapchain); \ 548 Assert(hr == S_OK); \ 549 g_VBoxVDbgInternalRc = NULL; \ 550 g_VBoxVDbgCfgCreateSwapchainOnDdiOnce = 0; \ 551 } \ 552 } while (0) 498 553 499 554 #else … … 509 564 #define VBOXVDBG_DUMP_LOCK_ST(_pData) do { } while (0) 510 565 #define VBOXVDBG_DUMP_UNLOCK_ST(_pData) do { } while (0) 566 #define VBOXVDBG_DUMP_PRESENT_ENTER(_pDevice, _pSwapchain) do { } while (0) 567 #define VBOXVDBG_DUMP_PRESENT_LEAVE(_pDevice, _pSwapchain) do { } while (0) 511 568 #define VBOXVDBG_BREAK_SHARED(_pRc) do { } while (0) 512 569 #define VBOXVDBG_BREAK_DDI() do { } while (0) … … 515 572 #define VBOXVDBG_CHECK_TEXBLT(_opTexBlt, _pSrcRc, _pSrcRect, _pDstRc, _pDstPoint) do { _opTexBlt; } while (0) 516 573 #define VBOXVDBG_ASSERT_IS_DWM(_bDwm) do { } while (0) 574 #define VBOXVDBG_CHECK_SWAPCHAIN_SYNC(_op, _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) do { _op; } while (0) 575 #define VBOXVDBG_CREATE_CHECK_SWAPCHAIN() do { } while (0) 517 576 #endif 518 577 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/directx.c
r39602 r39819 885 885 } 886 886 887 #ifdef VBOX_WITH_WDDM 888 static BOOL match_mesa_nvidia(const struct wined3d_gl_info *gl_info, const char *gl_renderer, 889 enum wined3d_gl_vendor gl_vendor, enum wined3d_pci_vendor card_vendor, enum wined3d_pci_device device) 890 { 891 if (card_vendor != HW_VENDOR_NVIDIA) return FALSE; 892 if (gl_vendor != GL_VENDOR_MESA) return FALSE; 893 return TRUE; 894 } 895 896 static void quirk_no_shader_3(struct wined3d_gl_info *gl_info) 897 { 898 int vs_selected_mode, ps_selected_mode; 899 select_shader_mode(gl_info, &ps_selected_mode, &vs_selected_mode); 900 if (vs_selected_mode != SHADER_GLSL && ps_selected_mode != SHADER_GLSL) 901 return; 902 903 gl_info->limits.arb_ps_instructions = 512; 904 } 905 #endif 906 887 907 struct driver_quirk 888 908 { … … 974 994 "Fullsize blit" 975 995 }, 996 #ifdef VBOX_WITH_WDDM 997 { 998 match_mesa_nvidia, 999 quirk_no_shader_3, 1000 "disable shader 3 support" 1001 }, 1002 #endif 976 1003 }; 977 1004 … … 1943 1970 { 1944 1971 FIXME_(d3d_caps)("Card selection not handled for Mesa Nouveau driver\n"); 1972 #ifndef VBOX_WITH_WDDM 1945 1973 if (WINE_D3D9_CAPABLE(gl_info)) return CARD_NVIDIA_GEFORCEFX_5600; 1974 #else 1975 /* tmp work around to disable quirk_no_np2 quirk for mesa drivers */ 1976 if (WINE_D3D9_CAPABLE(gl_info)) return CARD_NVIDIA_GEFORCE_6200; 1977 #endif 1946 1978 if (WINE_D3D8_CAPABLE(gl_info)) return CARD_NVIDIA_GEFORCE3; 1947 1979 if (WINE_D3D7_CAPABLE(gl_info)) return CARD_NVIDIA_GEFORCE; … … 2056 2088 * them a good generic choice. */ 2057 2089 *card_vendor = HW_VENDOR_NVIDIA; 2090 #ifndef VBOX_WITH_WDDM 2058 2091 if (WINE_D3D9_CAPABLE(gl_info)) return CARD_NVIDIA_GEFORCEFX_5600; 2092 #else 2093 /* tmp work around to disable quirk_no_np2 quirk for not-recognized drivers */ 2094 if (WINE_D3D9_CAPABLE(gl_info)) return CARD_NVIDIA_GEFORCE_6200; 2095 #endif 2096 2059 2097 if (WINE_D3D8_CAPABLE(gl_info)) return CARD_NVIDIA_GEFORCE3; 2060 2098 if (WINE_D3D7_CAPABLE(gl_info)) return CARD_NVIDIA_GEFORCE;
Note:
See TracChangeset
for help on using the changeset viewer.