Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[util] Add DXVK_CONFIG to define additional options #3581

Merged
merged 2 commits into from Aug 1, 2023

Conversation

pchome
Copy link
Contributor

@pchome pchome commented Jul 25, 2023

Lazy-ass implementation

  • # used as separator
  • ; used as separator
  • options will override/extend those in dxvk.conf file
  • DXVK_CONFIG="dxvk.hud=full#dxvk.blah = blah;blah:blah,#"
  • DXVK_CONFIG="dxvk.hud = full; dxvk.blah=blah"

Note:

  • DXVK_HUD variable still have higher priority than dxvk.conf and DXVK_CONFIG
  • # act as comment now (same as in dxvk.conf)
    e.g. DXVK_CONFIG="#Show compiler; dxvk.hud = compiler; #dxvk.blah=blah"
    Lets call it feature.

Closes: #2894

* `#` used as separator
* options will override/extend those in dxvk.conf file
* `DXVK_CONFIG="dxvk.hud=full#dxvk.blah = blah;blah:blah,#"`
// help when debugging configuration issues
Logger::info(str::format("Found config env: ", confLine));

for(auto l : str::split(confLine, "#"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why '#' specifically? that's such an odd choice when everything else either uses ; or :, and much like ; it hard-requires using quotes on the string as well so i don't really see the benefit here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most standard separators already taken by some options, I saw there was , and maybe ; in upcoming dx8 implementation. : already used by d3d9.forceAspectRatio.

Could be whitespace, but copy-pasting something from dxvk.conf or web will not work, e.g DXVK_CONFIG="dxvk.hud = full" "user friendly" vs DXVK_CONFIG="dxvk.hud=full" with strict (whitespace separator) variant.

Just random choice, to be honest.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ; should be reserved as a separator and not be allowed in option values then. I'd rather change this on the d3d8 side than introduce a weird separator here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine by me, changed it to ;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d8vk only uses , and : AFAIK, so ; should be perfectly safe to use here.

@doitsujin doitsujin merged commit e598dcd into doitsujin:master Aug 1, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] able to define configuration properties through an environment variable
3 participants