protonscr

RFC: Built-in GPU profiles

dxvkclosed
doitsujin/dxvk#1873 · opened 2020-12-30 by pchome · updated 2020-12-31 · 7 comments · github
Ppchome 2020-12-30 github

Description

Many games use GPU VendorID/DeviceID or DeviceName to determine default settings, some of them have predefined lists of this data. For obvious reasons older games knows nothing about modern GPUs.

Idea

Let's collect a list of most popular GPU models and use them for built-in profiles (option).
E.g. dxvk.profile = 2010,nvidia,high (maybe even ,strict to override VMEM and maybe driver version), where:

  • 2010 - year index, mean GPU model was around for a while
    (step is 5, so valid ones are: 2000, 2005,...)
  • nvidia - vendor
    (amd or nvidia, maybe intel for year index >= 2020)
  • high - preset, commonly used in games for picked GPU model
    (valid ones are: high, mid, low)

For every next year index there will be new high preset GPU models, all other models will be shifted down (aliases).
Defaults: top of the list, e.g. =high mean =2020,<current gpu>,high.
Order: don't matter (e.g. =amd,2015,mid).

I don't know much about GPU models, but I checked/compared some configs from my currently installed games and can propose
0x10DE, 0x0191, NVIDIA GeForce 8800 GTX for =2010,nvidia,high.
It present in all lists I found. Except for 2015 this GPU can be still high (5) for UE3 games released near 2015, but low/mid for CryEngine (State of Decay).

**Click for draft list**
ue3: ? | 0x1002, 0x671D, 4 // Radeon HD 6990
ue3: 5 | 0x10DE, 0x1088, 4 // GeForce GTX 590       | NVIDIA GeForce GTX 590

ue3: 5 | 0x10DE, 0x1244, 3 // GeForce GTX 550 Ti    | NVIDIA GeForce GTX 550 Ti
ue3: 4 | 0x1002, 0x6758, 3 // Radeon HD 6600 Series | AMD Radeon HD   6670

ue3: 3 | 0x10DE, 0x062D, 1 // GeForce 9600 GT       | NVIDIA GeForce 9600 GT
ue3: 5 | 0x10DE, 0x0611, 1 // GeForce 8800 GT       | GeForce 8800 GT
ue3: 5 | 0x10DE, 0x0191, 2 // GeForce 8800 GTX      | NVIDIA GeForce 8800 GTX
ue3: 3 | 0x1002, 0x9540, 1 // Radeon HD 4590        | ATI Radeon HD 4590

ue3: 5 | 0x10DE, 0x05E1, 2 // GeForce GTX 280       | GeForce GTX 280
ue3: 5 | 0x10DE, 0x05E2, 2 // GeForce GTX 260       | GeForce GTX 260

ue3: 4 | 0x10DE, 0x0091,-1 // GeForce 7800 GTX      | GeForce 7800 GTX

Left: presence in UE3 configs (one of),
Middle: CryEngine list (from State of Decay),
Right: UE3 device marketing name
Max. perf level: 5 for ue3, 4 for cryengine.

Motivation

I can name UE3 games or CryEngine games, but this is about first launch user experience. Even when launched with low-spec preset, there are game settings usually available to improve things.
Or games like GTA IV, even DXVK have some hardcoded GPU models for Sims2 and Halo in it's config. In such cases wrongly detected GPU can cause real harm on overall user experience.

Of-cause we can use available options to override GPU info, but IMHO profiles will be more user-friendly.
This profiles almost useless outside Wine/DXVK, so better have them in one place, instead of third-party tools/configs.

Examples

I tested Borderlands 2 with default DXVK config and with override known by the game. This is UE3 game, uses predefined list of GPU IDs. With defaults it was launched with performance level 4 (lowered resolution and view distance setting), while with override it was launched with performance level 5.

[0000.72] Log: Machine  detected compatibility level: Composite: 5. CPU: 5. GPU: 5.
[0000.72] Log: Previous detected compatibility level: Composite: 4. CPU: 5. GPU: 4.
**Click for config diff**
diff -r Config.high/WillowEngine.ini Config.default/WillowEngine.ini
1151c1151
< MaxAnisotropy=16
---
> MaxAnisotropy=4
1165,1166c1165,1166
< ResX=1280
< ResY=720
---
> ResX=1024
> ResY=768
1268c1268
< ViewDistance=3
---
> ViewDistance=2
2242,2243c2242,2243
< MeasuredCPUScore=163.018204
< CompatLevelComposite=5
---
> MeasuredCPUScore=162.302094
> CompatLevelComposite=4
2245c2245
< CompatLevelGPU=5
---
> CompatLevelGPU=4

green - default, red - high (override, GeForce GTX 590)

Lliandris 2020-12-30 github

Side note, it's possible to obtain the compilation date of the .exe automatically through PE header. It will only fail if the .exe was created by some non-standard compiler or protected by some very impudent DRM.
This way, year part might include auto option which would make it choose the proper year automatically.

Ddoitsujin maintainer 2020-12-30 github

In such cases wrongly detected GPU can cause real harm on overall user experience.

What do you mean? Sims 2 simply does not work on modern GPUs because the game is so utterly broken, it needs the GPU override. I'm really not sure what the problem is you're trying to solve here that would warrant dumping a database of hundreds of different GPUs into a project that 99% of the time doesn't have to care about it at all and has solutions for the 1% where it does matter.

Ppchome 2020-12-30 github

@liandris

Side note, it's possible to obtain the compilation date of the .exe automatically through PE header.

I think it will be hard to connect profile to exact year.
That's why I propose to use something like this:
... 00 01 02 ][03 04 05 06 07 ][08 09 10 11 12][13 14 15 16 17][18 19 20 ...

To be sure game was released when GPU was available and popular. Like for 8800 GTX, which was released somewhere in 2006, I checked Batman:AC (2011?) and this GPU is one of only few "high profile" in the games gpu list. And I remember 8800 memes (maybe because of Crysis memes), so I guess it was popular and widely used (maybe only by game-devs).

@doitsujin
It would be near dozen most known gpu models.
Well, I can do this outside DXVK, and I started this already, but as I said it useless for other things than Wine/DXVK.
So I decided to share.

Ddoitsujin maintainer 2020-12-30 github

I'm still not sure I understand why we need this. So basically you want generic profiles in order to convince a handful of games using some very specific engines to use different settings on first launch? Why not just use the graphics menu and change things by hand? Things don't really get any more user friendly than that..

This really sounds like a really dumb "solution" for a problem in a handful of games.

Ppchome 2020-12-30 github

Well, that's why RFC. If you sure you don't need this in DXVK, then we can just collect the list. Because it's hard to remember vendor/device IDs or exact marketing names (in case game detects GPU by it's name). Then it can be used e.g. in wiki, or by Proton and variants with integrated protonfixes, etc.

I don't mean this thing needed to fix something (it can be used to fix), just easy to use alternative for existing override options. Also easy to experiment if an game have problems.

Ddoitsujin maintainer 2020-12-30 github

wined3d already has an exhaustive (although somewhat out of date) list that maps GPU/Vendor ID to GPU names, I don't think we need to reinvent the wheel here.

Ppchome 2020-12-31 github

Okay, I guess I should not expect any help here.

Nothing extracted yet.