VirtualBox

Ignore:
Timestamp:
Jul 4, 2013 6:08:11 AM (11 years ago)
Author:
vboxsync
Message:

wddm/crOpenGL: some bugfixes, more TexPresent fixes

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
Files:
3 edited

Legend:

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

    r46783 r46966  
    831831
    832832    HRESULT hr = pAdapter->D3D.pD3D9If->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, NULL, fFlags, &Params.Base, &pDevice9If);
    833     if (!SUCCEEDED(hr))
    834     {
     833    if (SUCCEEDED(hr))
     834    {
     835        int32_t hostId = 0;
     836        hr = pAdapter->D3D.D3D.pfnVBoxWineExD3DDev9GetHostId((IDirect3DDevice9Ex*)pDevice9If, &hostId);
     837        if (SUCCEEDED(hr))
     838        {
     839            Assert(hostId);
     840
     841            VBOXDISPIFESCAPE Data;
     842            Data.escapeCode = VBOXESC_SETCTXHOSTID;
     843            Data.u32CmdSpecific = (uint32_t)hostId;
     844            D3DDDICB_ESCAPE DdiEscape = {0};
     845            DdiEscape.hContext = pDevice->DefaultContext.ContextInfo.hContext;
     846            DdiEscape.hDevice = pDevice->hDevice;
     847        //    DdiEscape.Flags.Value = 0;
     848            DdiEscape.pPrivateDriverData = &Data;
     849            DdiEscape.PrivateDriverDataSize = sizeof (Data);
     850            hr = pDevice->RtCallbacks.pfnEscapeCb(pDevice->pAdapter->hAdapter, &DdiEscape);
     851            if (SUCCEEDED(hr))
     852            {
     853                pDevice->pDevice9If = pDevice9If;
     854                return S_OK;
     855            }
     856            else
     857                WARN(("pfnEscapeCb VBOXESC_SETCTXHOSTID failed hr 0x%x", hr));
     858        }
     859        else
     860            WARN(("pfnVBoxWineExD3DDev9GetHostId failed hr 0x%x", hr));
     861
     862        pDevice->pAdapter->D3D.D3D.pfnVBoxWineExD3DDev9Term((IDirect3DDevice9Ex *)pDevice9If);
     863    }
     864    else
    835865        WARN(("CreateDevice failed hr 0x%x", hr));
    836         return hr;
    837     }
    838 
    839     pDevice->pDevice9If = pDevice9If;
    840     return S_OK;
    841 }
    842 
     866
     867    return hr;
     868}
     869
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.cpp

    r46783 r46966  
    160160        {
    161161            WARN(("no VBoxWineExD3DSwapchain9GetHostWinID"));
     162            break;
     163        }
     164
     165        pD3D->pfnVBoxWineExD3DDev9GetHostId = (PFNVBOXWINEEXD3DDEV9_GETHOSTID)GetProcAddress(pD3D->hD3DLib, "VBoxWineExD3DDev9GetHostId");
     166        if (!pD3D->pfnVBoxWineExD3DDev9GetHostId)
     167        {
     168            WARN(("no VBoxWineExD3DDev9GetHostId"));
    162169            break;
    163170        }
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.h

    r46783 r46966  
    8585    PFNVBOXWINEEXD3DSWAPCHAIN9_GETHOSTWINID pfnVBoxWineExD3DSwapchain9GetHostWinID;
    8686
     87    PFNVBOXWINEEXD3DDEV9_GETHOSTID pfnVBoxWineExD3DDev9GetHostId;
     88
    8789    /* module handle */
    8890    HMODULE hD3DLib;
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