protonscr

Unexpected behavior of IDXGIAdapter3::QueryVideoMemoryInfo

dxvkclosed dxginot a bug
doitsujin/dxvk#2057 · opened 2021-05-11 by Andon13 · updated 2021-05-11 · 3 comments · github
AAndon13 2021-05-11 github

DXVK currently returns a successful HRESULT for all nodes when this function is called. Since multi-GPU stuff probably is well outside the scope of DXVK, I would suggest returning a failure (DXGI_ERROR_NOT_FOUND) for all but the first node (0).

I had some poorly written code that enumerated all nodes available by checking the HRESULT until the call failed. On Windows it stopped enumerating as expected, but in DXVK it basically turned into an infinite loop :)

Mmisyltoad 2021-05-11 github

DXVK does not do that though:

    if (NodeIndex > 0 || !pVideoMemoryInfo)
      return E_INVALIDARG;

It is possible the return code is incorrect for this case however.

Mmisyltoad 2021-05-11 github

Testing on Windows 10 2004 with native DXGI, when NodeIndex > 0, I get 0x80070057 which is E_INVALIDARG so there is no bug here.

Mmisyltoad 2021-05-11 github

(I believe you may have been running with Wine's DXGI instead of DXVK's which ignores NodeIndex and would have this issue)

Error codes