VirtualBox

Changeset 37907 in vbox


Ignore:
Timestamp:
Jul 12, 2011 5:28:34 PM (13 years ago)
Author:
vboxsync
Message:

wddm/3d: fix performance regression

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.cpp

    r37840 r37907  
    10251025static BOOLEAN vboxWddmDalCheckAdd(PVBOXWDDMDISP_DEVICE pDevice, PVBOXWDDMDISP_ALLOCATION pAlloc, BOOLEAN fWrite)
    10261026{
    1027     if (!pAlloc->hSharedHandle) /* only shared resources matter */
    1028     {
    1029         Assert(!pAlloc->DirtyAllocListEntry.pNext);
     1027    if (!pAlloc->hSharedHandle /* only shared resources matter */
     1028            || !fWrite) /* only write op matter */
     1029    {
     1030        Assert(!pAlloc->DirtyAllocListEntry.pNext || (!fWrite && pAlloc->hSharedHandle && pAlloc->fDirtyWrite));
    10301031        return FALSE;
    10311032    }
     
    21662167    if (pSwapchain->cRTs == 1)
    21672168    {
     2169        IDirect3DSurface9 *pD3D9Bb;
     2170        /* only use direct bb if wine is able to handle quick blits bewteen surfaces in one swapchain,
     2171         * this is FALSE by now :( */
     2172# ifdef VBOX_WINE_WITH_FAST_INTERSWAPCHAIN_BLT
    21682173        /* here we sync the front-buffer with a backbuffer data*/
    2169         IDirect3DSurface9 *pD3D9Bb = (IDirect3DSurface9*)vboxWddmSwapchainGetBb(pSwapchain)->pAlloc->pD3DIf;
     2174        pD3D9Bb = (IDirect3DSurface9*)vboxWddmSwapchainGetBb(pSwapchain)->pAlloc->pD3DIf;
    21702175        Assert(pD3D9Bb);
    21712176        pD3D9Bb->AddRef();
     
    21762181        }
    21772182        pSwapchain->pRenderTargetFbCopy = pD3D9Bb;
     2183# else
     2184        pD3D9Bb = pSwapchain->pRenderTargetFbCopy;
     2185# endif
    21782186        HRESULT tmpHr = pSwapchain->pSwapChainIf->GetFrontBufferData(pD3D9Bb);
    21792187        if (SUCCEEDED(tmpHr))
     
    21812189            VBOXVDBG_DUMP_SYNC_RT(pD3D9Bb);
    21822190            pSwapchain->bRTFbCopyUpToDate = TRUE;
     2191# ifndef VBOX_WINE_WITH_FAST_INTERSWAPCHAIN_BLT
     2192            tmpHr = pDevice->pDevice9If->StretchRect(pD3D9Bb, NULL, (IDirect3DSurface9*)vboxWddmSwapchainGetBb(pSwapchain)->pAlloc->pD3DIf, NULL, D3DTEXF_NONE);
     2193            if (FAILED(tmpHr))
     2194            {
     2195                WARN(("StretchRect failed, hr (0x%x)", tmpHr));
     2196            }
     2197# endif
    21832198        }
    21842199        else
     
    24052420#ifndef VBOXWDDM_WITH_VISIBLE_FB
    24062421        pSwapchain->bRTFbCopyUpToDate = FALSE;
    2407 # ifdef VBOXDISP_WITH_WINE_BB_WORKAROUND
     2422# if defined(VBOXDISP_WITH_WINE_BB_WORKAROUND) && defined(VBOX_WINE_WITH_FAST_INTERSWAPCHAIN_BLT)
     2423        /* if wine is able to do fast fb->bb blits, we will use backbuffer directly,
     2424         * this is NOT possible currently */
    24082425        if (pSwapchain->cRTs == 1)
    24092426        {
     
    25732590            {
    25742591                WARN(("GetFrontBufferData failed, hr (0x%x)", hr));
     2592                pSurf->Release();
    25752593                return hr;
    25762594            }
     
    67946812                    HANDLE hSharedHandle = pAllocation->hSharedHandle;
    67956813                    Assert(pAllocation->hSharedHandle);
     6814
    67966815#ifdef DEBUG_misha
    6797                     vboxVDbgPrintR(("\n\n********\nShared Resource (0x%x), (0n%d) openned\n\n\n", hSharedHandle, hSharedHandle));
     6816                    vboxVDbgPrint(("\n\n********\nShared Resource (0x%x), (0n%d) openned\n\n\n", hSharedHandle, hSharedHandle));
    67986817#endif
    67996818
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette