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

proton: Populate NVIDIA_WINE_DLL_DIR when available #8087

Open
wants to merge 2 commits into
base: experimental_9.0
Choose a base branch
from

Conversation

liam-middlebrook
Copy link
Contributor

NVIDIA-software may check the environment variable NVIDIA_WINE_DLL_DIR for a path where DLLs provided by the NVIDIA Linux driver can be found. This needs to be set by proton script, as it is ran inside of the pressure-vessel environment, so the paths returned will be valid within the environment.

Tested with an application that reads NVIDIA_WINE_DLL_DIR from the environment and tries to load a known DLL from it. As expected manually setting the environment variable to the on-disk location did not work, as the path is not accurate within the pressure-vessel environment.

Plagman pushed a commit that referenced this pull request Sep 10, 2024
NVIDIA-software may check the environment variable `NVIDIA_WINE_DLL_DIR`
for a path where DLLs provided by the NVIDIA Linux driver can be found.
This needs to be set by `proton` script, as it is ran inside of the
pressure-vessel environment, so the paths returned will be valid within
the environment.

Tested with an application that reads `NVIDIA_WINE_DLL_DIR` from the
environment and tries to load a known DLL from it. As expected manually
setting the environment variable to the on-disk location did not work,
as the path is not accurate within the pressure-vessel environment.

#8087
Copy link

@adamdmoss adamdmoss left a comment

Choose a reason for hiding this comment

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

For what my ex-nvidia-employee opinion is worth: LGTM. I infer from the lack of specifics (and not privileged knowledge) that this is to enable some future tech work, but if there is an existing title which needs this then pointing it out would be good for verification purposes.

@liam-middlebrook
Copy link
Contributor Author

Noting from a side-discussion between myself @ivyl, pgofman, and zf. This environment variable isn't ideal because it creates wine/proton specific behavior. Since the way this would be read on Windows isn't currently supported in Wine, this environment variable will only be read as a fallback. That way, in the future if the primary path is supported, this logic could be removed.

In the meantime there's some cleanup things to do here (like avoiding running through the C_DLL logic twice).

NVIDIA-software may check the environment variable `NVIDIA_WINE_DLL_DIR`
for a path where DLLs provided by the NVIDIA Linux driver can be found.
This is done as a fallback for when the "DriverStore" cannot be detected
via the D3DDDI functions for querying an adapter-specific registry key.

Tested with an application that reads `NVIDIA_WINE_DLL_DIR` from the
environment and tries to load a known DLL from it. As expected manually
setting the environment variable to the on-disk location did not work,
as the path is not accurate within the pressure-vessel environment.
@liam-middlebrook liam-middlebrook force-pushed the lmiddlebrook/nvidia-wine-dll-dir-env branch from 34e90a8 to d380d66 Compare September 19, 2024 04:29
@Plagman Plagman force-pushed the experimental_9.0 branch 3 times, most recently from 124cdc3 to 2a4943d Compare October 1, 2024 18:22
vinifmor pushed a commit to vinifmor/Proton that referenced this pull request Oct 3, 2024
NVIDIA-software may check the environment variable `NVIDIA_WINE_DLL_DIR`
for a path where DLLs provided by the NVIDIA Linux driver can be found.
This needs to be set by `proton` script, as it is ran inside of the
pressure-vessel environment, so the paths returned will be valid within
the environment.

Tested with an application that reads `NVIDIA_WINE_DLL_DIR` from the
environment and tries to load a known DLL from it. As expected manually
setting the environment variable to the on-disk location did not work,
as the path is not accurate within the pressure-vessel environment.

ValveSoftware#8087
@Plagman Plagman force-pushed the experimental_9.0 branch 2 times, most recently from 5d2111a to 7f6b0ff Compare October 7, 2024 17:08
Plagman pushed a commit that referenced this pull request Nov 6, 2024
NVIDIA-software may check the environment variable `NVIDIA_WINE_DLL_DIR`
for a path where DLLs provided by the NVIDIA Linux driver can be found.
This is done as a fallback for when the "DriverStore" cannot be detected
via the D3DDDI functions for querying an adapter-specific registry key.

Tested with an application that reads `NVIDIA_WINE_DLL_DIR` from the
environment and tries to load a known DLL from it. As expected manually
setting the environment variable to the on-disk location did not work,
as the path is not accurate within the pressure-vessel environment.

Link: #8087
Plagman pushed a commit that referenced this pull request Nov 27, 2024
NVIDIA-software may check the environment variable `NVIDIA_WINE_DLL_DIR`
for a path where DLLs provided by the NVIDIA Linux driver can be found.
This is done as a fallback for when the "DriverStore" cannot be detected
via the D3DDDI functions for querying an adapter-specific registry key.

Tested with an application that reads `NVIDIA_WINE_DLL_DIR` from the
environment and tries to load a known DLL from it. As expected manually
setting the environment variable to the on-disk location did not work,
as the path is not accurate within the pressure-vessel environment.

Link: #8087
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.

2 participants