VirtualBox

Changeset 82547 in vbox for trunk


Ignore:
Timestamp:
Dec 11, 2019 1:24:35 PM (5 years ago)
Author:
vboxsync
Message:

WDDM: added DXVAHD and WIN7 adapter capabilities, currently disabled

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Video
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/common/wddm/VBoxMPIf.h

    r82414 r82547  
    569569#endif /* VBOX_WITH_MESA3D */
    570570
    571 #define VBOXWDDM_QAI_CAP_3D   0x00000001 /* 3D is enabled in the VM settings. */
    572 #define VBOXWDDM_QAI_CAP_DXVA 0x00000002 /* DXVA is not disabled in the guest registry. */
     571#define VBOXWDDM_QAI_CAP_3D     0x00000001 /* 3D is enabled in the VM settings. */
     572#define VBOXWDDM_QAI_CAP_DXVA   0x00000002 /* DXVA is not disabled in the guest registry. */
     573#define VBOXWDDM_QAI_CAP_DXVAHD 0x00000004 /* DXVA-HD is not disabled in the guest registry. */
     574#define VBOXWDDM_QAI_CAP_WIN7   0x00000008 /* User mode driver can report D3D_UMD_INTERFACE_VERSION_WIN7. */
    573575
    574576/* D3DDDICB_QUERYADAPTERINFO::pPrivateDriverData */
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.cpp

    r81632 r82547  
    180180            pOpenData->pAdapterFuncs->pfnCreateDevice = GaDdiAdapterCreateDevice;
    181181            pOpenData->pAdapterFuncs->pfnCloseAdapter = GaDdiAdapterCloseAdapter;
    182             pOpenData->DriverVersion                  = D3D_UMD_INTERFACE_VERSION_VISTA;
     182            pOpenData->DriverVersion                  = RT_BOOL(pAdapterInfo->u32AdapterCaps & VBOXWDDM_QAI_CAP_WIN7)
     183                                                      ? D3D_UMD_INTERFACE_VERSION_WIN7
     184                                                      : D3D_UMD_INTERFACE_VERSION_VISTA;
    183185        }
    184186#endif
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/gallium/GaWddm.cpp

    r82416 r82547  
    801801#endif
    802802
    803 HRESULT GaWddmGetD3D9Caps(IDirect3D9Ex *pD3D9If, D3DCAPS9 *pCaps)
     803static HRESULT gaWddmGetD3D9Caps(VBOXWDDM_QAI const *pAdapterInfo, IDirect3D9Ex *pD3D9If, D3DCAPS9 *pCaps)
    804804{
    805805    HRESULT hr = pD3D9If->GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, pCaps);
     
    841841    pCaps->PS20Caps.Caps           |= D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT;
    842842
     843    if (RT_BOOL(pAdapterInfo->u32AdapterCaps & VBOXWDDM_QAI_CAP_DXVAHD))
     844        pCaps->Caps3 |=  D3DCAPS3_DXVAHD;
     845
    843846#ifdef DEBUG
    844847    vboxDispCheckCapsLevel(pCaps);
     
    11681171        if (SUCCEEDED(hr))
    11691172        {
    1170             hr = GaWddmGetD3D9Caps(pD3D9, &pD3D->Caps);
     1173            hr = gaWddmGetD3D9Caps(pAdapterInfo, pD3D9, &pD3D->Caps);
    11711174            pD3D9->Release();
    11721175
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp

    r82414 r82547  
    17551755                    pQAI->u32AdapterCaps = pDevExt->f3DEnabled ? VBOXWDDM_QAI_CAP_3D : 0;
    17561756                    pQAI->u32AdapterCaps |= VBOXWDDM_QAI_CAP_DXVA; /** @todo Fetch from registry. */
     1757                    if (VBoxQueryWinVersion(NULL) >= WINVERSION_7)
     1758                    {
     1759                        // pQAI->u32AdapterCaps |= VBOXWDDM_QAI_CAP_WIN7;
     1760                        // pQAI->u32AdapterCaps |= VBOXWDDM_QAI_CAP_DXVAHD; /** @todo Fetch from registry. */
     1761                    }
     1762
    17571763                    static int cLoggedCaps = 0;
    17581764                    if (cLoggedCaps < 1)
    17591765                    {
    17601766                        ++cLoggedCaps;
    1761                         LOGREL_EXACT(("WDDM: addapter capabilities 0x%08X\n", pQAI->u32AdapterCaps));
     1767                        LOGREL_EXACT(("WDDM: adapter capabilities 0x%08X\n", pQAI->u32AdapterCaps));
    17621768                    }
     1769
    17631770                    if (pDevExt->enmHwType == VBOXVIDEO_HWTYPE_VBOX)
    17641771                    {
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