doitsujin / dxvk

Vulkan-based implementation of D3D9, D3D10 and D3D11 for Linux / Wine
zlib License
12.25k stars 783 forks source link

Question about custom Vendor and Device IDs #4070

Closed Tiagoquix closed 2 weeks ago

Tiagoquix commented 2 weeks ago

Hi there.

In the file https://github.com/doitsujin/dxvk/blob/master/src/util/config/config.cpp, I see some cases where only a custom Device ID or Vendor ID is set (not both, only one of them). Examples:

https://github.com/doitsujin/dxvk/blob/018db92342769fa847d356e5f578c43c89b46a18/src/util/config/config.cpp#L516-L525

How does DXVK handle a situation where only a custom Device or Vendor ID is supplied, but not the other?

I imagine that for Device IDs, since they seem to be unique, DXVK or the app/game in question will automatically figure out the corresponding Vendor ID.

However, when only a custom Vendor ID is supplied, does DXVK fall back to a default Device ID for that vendor or something like that?

Thanks in advance for your attention.

doitsujin commented 2 weeks ago

If there's no override we just return whatever the real device ID is. The vast majority of games does not query the device ID at all, just the vendor ID.

Tiagoquix commented 2 weeks ago

Isn't there some kind of problem when, for example, the Device ID is one from AMD and the Vendor ID is one from NVIDIA?

Logically, it seems like this wouldn't work out well somehow, but I could be wrong.

mbriar commented 2 weeks ago

I doubt there is any game in existence that tries to match those combinations and then decides to freak out.

doitsujin commented 2 weeks ago

Any such game would literally break on any GPU released after the game itself. The only known case of that happening is Sims 2, and we set a device ID there.