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] Improve logging for configuration settings. #630

Closed
wants to merge 4 commits into from

Conversation

jp7677
Copy link
Contributor

@jp7677 jp7677 commented Sep 9, 2018

Log when default settings are found.
Log effective configuration settings.

Log when default settings are found.
Log effective configuration settings.
Since we can spoof both ID's it is nice to see the real values.
@doitsujin
Copy link
Owner

It'd be nice if you could explain the reason why we need this.

That said, I've seen less useful PRs.

@jp7677
Copy link
Contributor Author

jp7677 commented Sep 9, 2018

Yes, sure, sorry ;)
Currently there are two ways for setting configuration options, built-in and by config file. Settings from both way are merged and applied. I thought it might be useful to see:

  1. That default settings are applied.
  2. What the result is when default settings and settings from the config file are merged.

Furthermore I added logging for vendor and device id. E.g. if I don't want to use the built-in settings for vendor and device ID for Arkham Knight, I would know which ID's I would have to use in a dxvk config file.

Edit: With the recently added configuration options I guess it would be useful to have all applied settings in the log files when people report issues here. From my experience this can greatly support the troubleshooting. Usually people will get very creative with config options or just blindly download random configs from somewhere and apply these ;).

@jp7677
Copy link
Contributor Author

jp7677 commented Sep 9, 2018

Logging with this PR would look like:

info:  Game: BatmanAK.exe
info:  DXVK: v0.71
info:  Found built-in config: BatmanAK.exe
info:  Effective config settings:
info:    dxgi.customVendorId = 1002
info:    dxgi.customDeviceId = E366
warn:  OpenVR: Failed to locate module
info:  Enabled instance extensions:
info:    VK_KHR_get_physical_device_properties2
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
info:  GeForce GTX 1080:
info:    Vendor ID: 0x10de
info:    Device ID: 0x1b80
info:    Driver: 396.54.0
info:    Vulkan: 1.1.70
...

When a config file is used you would additionally see the already existing log line Found config file: <filePath>

Note that I went for "=" as separator between key and value like it would be used in a config file. Let me know what you prefer. Using ":" would be more consistent with other log statements.

Edit: Updated with hex values.

src/util/config/config.cpp Outdated Show resolved Hide resolved
src/dxvk/dxvk_adapter.cpp Outdated Show resolved Hide resolved
@jp7677
Copy link
Contributor Author

jp7677 commented Sep 9, 2018

Should be good now.

@jp7677
Copy link
Contributor Author

jp7677 commented Sep 12, 2018

Nitpicking alert: std::hex results in lower case hex value. I guess it would read slightly nicer in the logs if the values for the built-in settings for device ID and vendor ID were also lower case. Thus

{ "dxgi.customDeviceId", "e366" },
instead of:
{ "dxgi.customDeviceId", "E366" },

Let me know if you want me to include casing adjusting for the built-in settings in this (or separate) PR.

@doitsujin
Copy link
Owner

I added this functionality in d494726 based on your work.

@doitsujin doitsujin closed this Sep 14, 2018
@jp7677
Copy link
Contributor Author

jp7677 commented Sep 14, 2018 via email

@doitsujin
Copy link
Owner

I left them out deliberately because they don't add valuable information in my opinion. Knowing the vendor and device name, it's easy enough to look up the PCIe IDs if you absolutely need them, but tbh I don't see why you would.

@jp7677
Copy link
Contributor Author

jp7677 commented Sep 14, 2018

I think (as a general note) if you can override a setting, it is useful to have the default value at hand.
Let say I want to undo the built-in overrides for GTA5 for whatever reason (troubleshooting, see if things got improved with nvapi, test if the built-in override is still needed etc). From the logs I know the built-in override IDs and I know that I would have to use a configuration file to put my actual/original values in there (because settings in the config file override the built-in settings, as far as I understood the code). In that case it would be cool if I can just copy the ID's (excluding 0x) from the dxvk log file instead of searching through /proc or somewhere else and then ev. having to think about dec-hex conversion.

I fully agree that these ID's are way to much details for the HUD, though I think they wouldn't hurt in the logs.

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.

None yet

2 participants