VirtualBox

Ignore:
Timestamp:
Aug 24, 2010 4:29:20 AM (14 years ago)
Author:
vboxsync
Message:

wddm/3d: work-around wine backbuffer creation for d3d devices w/o backbuffer

File:
1 edited

Legend:

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

    r31868 r31875  
    11061106
    11071107    pAlloc = &pRc->aAllocations[iNewRTFB];
     1108    if (pRc->cAllocations > 1)
     1109    {
    11081110#ifdef VBOXWDDM_WITH_VISIBLE_FB
    1109     HRESULT tmpHr = vboxWddmRenderTargetUpdateSurface(pDevice, pAlloc, ~0UL /* <- for the frontbuffer */);
    1110     Assert(tmpHr == S_OK);
     1111        HRESULT tmpHr = vboxWddmRenderTargetUpdateSurface(pDevice, pAlloc, ~0UL /* <- for the frontbuffer */);
     1112        Assert(tmpHr == S_OK);
    11111113#else
    1112     if (pAlloc->pD3DIf)
    1113     {
    1114         pAlloc->pD3DIf->Release();
    1115         pAlloc->pD3DIf = NULL;
    1116     }
     1114        if (pAlloc->pD3DIf)
     1115        {
     1116            pAlloc->pD3DIf->Release();
     1117            pAlloc->pD3DIf = NULL;
     1118        }
    11171119#endif
     1120    }
     1121    else
     1122    {
     1123        /* work-around wine backbuffer for devices w/o backbuffers */
     1124        HRESULT tmpHr = vboxWddmRenderTargetUpdateSurface(pDevice, pAlloc, 0);
     1125        Assert(tmpHr == S_OK);
     1126    }
    11181127
    11191128#ifdef DEBUG
     
    11231132        if (iNewRTFB == i)
    11241133        {
    1125             Assert(!pAlloc->pD3DIf);
     1134            Assert((!pAlloc->pD3DIf) == (pRc->cAllocations > 1));
    11261135        }
    11271136
     
    41614170            {
    41624171                ++cProcessed;
    4163                 if (pScreen->pRenderTargetRc->cAllocations == 1)
    4164                 {
    4165                     hr = pScreen->pDevice9If->Present(NULL, NULL, NULL, NULL);
    4166                     Assert(hr == S_OK);
    4167                 }
    4168                 else
     4172//                if (pScreen->pRenderTargetRc->cAllocations == 1)
     4173//                {
     4174//                    hr = pScreen->pDevice9If->Present(NULL, NULL, NULL, NULL);
     4175//                    Assert(hr == S_OK);
     4176//                }
     4177//                else
    41694178                {
    41704179                    hr = pDevice->pAdapter->D3D.pfnVBoxWineExD3DDev9Flush((IDirect3DDevice9Ex*)pScreen->pDevice9If);
     
    45474556        {
    45484557#ifndef VBOXWDDM_WITH_VISIBLE_FB
    4549             if (pSrcRc == pScreen->pRenderTargetRc && pScreen->iRenderTargetFrontBuf == pData->SrcSubResourceIndex)
     4558            if (pSrcRc == pScreen->pRenderTargetRc && pScreen->iRenderTargetFrontBuf == pData->SrcSubResourceIndex
     4559                    && pScreen->pRenderTargetRc->cAllocations > 1) /* work-around wine backbuffer */
    45504560            {
    45514561                PVBOXWDDMDISP_ALLOCATION pSrcAlloc = &pSrcRc->aAllocations[pData->SrcSubResourceIndex];
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