protonscr

dxgi misidentifies the graphics card information

dxvkclosed
doitsujin/dxvk#1093 · opened 2019-06-13 by bailehang · updated 2019-06-14 · 5 comments · github
1 matching comments, n / p to jump
Bbailehang 2019-06-13 github

System information

SYSTEM: 18.04.1-Ubuntu
GPU:GeForce GTX 1060 6G
Driver: 430
Wine version: 4.9 winehq-devel
DXVK version: the latest from git today

Hi,

I found a strange problem:
My graphics card is 1060, and only one video card from the system information, but the information given by dxgi is wrong.

IDXGIAdapter * pAdapter;
DXGI_ADAPTER_DESC Desc;
pAdapter->GetDesc(&Desc);
Desc.Description; //GeForce GTX 1060 6GB  It's right
Desc.VendorId; //It's 4098. This is wrong. The correct number is 4318
Desc.DeviceId;//It's 26591, It looks like it's identified RX 570. The correct number is 7171

But use dxdiag get information is right

GetChildContainer()
VendorId is 4318
DeviceId is 7171

Identifying the wrong graphics card can cause some rendering errors.
What causes it?

Thanks

SSveSop 2019-06-13 github

@bailehang
Not sure WHEN dxvk "fakes" amd vendor, but it might be listed in dxgi.log perhaps..

# Report Nvidia GPUs as AMD GPUs by default. This is enabled by default
# to work around issues with NVAPI, but may cause issues in some games.
#
# Supported values: True, False

# dxgi.nvapiHack = True

https://github.com/doitsujin/dxvk/blob/master/dxvk.conf#L34

For your info: VendorID:4098 (1002 HEX), and DevID: 26591 (67DF) is:
https://pci-ids.ucw.cz/read/PC/1002/67df
Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]

And probably what DXVK "fakes".

Try setting dxgi.nvapiHack = False in the config file and see what you get?

Bbailehang 2019-06-13 github

@SveSop It's work, thanks.
Can you explain why it should set false?
Shouldn't nvidia card just use nvapiHack?

SSveSop 2019-06-13 github

@bailehang

@SveSop It's work, thanks.
Can you explain why it should set false?
Shouldn't nvidia card just use nvapiHack?

nVidia in Windows have "nvapi" (nVidia library for various functions) included in the driver. wine-staging also generates this library with a few functions to emulate Windows behaviour, however DXVK does not communicate with these libraries, and games that specifically uses nvapi calls may crash/bug when attempting this.
By making DXVK "fake" a AMD card, the game/app will not try to use nvapi library, and most likely work.

The wording "nvapiHack" is just a wording... It could just as easily be called "FakeAMDHack" or whatever.

Since the default operation of DXVK is to fake an AMD card to avoid possible nvapi calls, the value is "by default" set to "True". And thus nvidia cards "just use nvapiHack" by default, but it kinda does not do what you thought it would :)

Ddoitsujin maintainer 2019-06-13 github

Basically what @SveSop said. Unfortunately, all recent Unreal Engine 4 games attempt to load nvapi.dll in every single frame if they detect an Nvidia card, which makes them run at extremely poor frame rates, so this hack is necessary.

Bbailehang 2019-06-14 github

I see, even if I use an Nvidia card, I still have to run it as an ATi card.
Thank you for explaining. @SveSop @doitsujin

DLLs