-
-
Notifications
You must be signed in to change notification settings - Fork 480
[Feature] Download DXVK 1.10.3 if no Vulkan 1.3 support is detected #2717
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow that was fast. Looks good to me. We can merge after Lint and Tests pass.
The tests look strange to me, it seems like Jest doesn't reset the module's state between runs (even with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine other than this
and also maybe add some stuff for downloading older vkd3d-proton
64ae099
to
93dea84
Compare
93dea84
to
5facaf7
Compare
A lot of older GPUs don't support Vulkan 1.3, which DXVK versions > 1.X.X requires. For those users, the "Auto-Install DXVK" function was entirely useless, as the DXVK Heroic installs will never work on their system. Now, Heroic will query the user's GPUs for their Vulkan support and install the older 1.10.3 version of DXVK if no Vulkan 1.3 support is detected. Internally, this is done by: - accepting not just a string as a download URL for tools, but also a function returning a string - DXVK's url function querying Vulkan support and choosing either the latest release or 1.10.3 based on that - new utility functions being added to interface with Vulkan directly Vulkan functions are called using a helper binary (see https://github.com/imLinguin/vulkan-helper-rs) Co-authored-by: Paweł Lidwin <[email protected]>
5facaf7
to
b4f1e86
Compare
src/backend/tools.ts
Outdated
@@ -43,7 +48,36 @@ export const DXVK = { | |||
}, | |||
{ | |||
name: 'dxvk', | |||
url: 'https://api.github.com/repos/doitsujin/dxvk/releases/latest', | |||
url: () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this function can be moved outside the const tools = [...
so we would just set url as a string, and then we don't need the const download_url = typeof tool.url === 'string' ? tool.url : tool.url()
line if it's always a string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you do that you can even do something like if (download_url) { tools.push({name: 'dxvk', url: dxvkUrl, etc...}) }
so you can handle the case when DXVK cannot be used (we have the FIXME saying we can't handle that case) by not adding it to the array of tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply not downloading DXVK isn't quite enough, the frontend/other parts of the backend would still try to install it (which would then fail, since the folder isn't there)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I see
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my first comment still applies though, to not have to do the if typeof === 'string' conditional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved it into its own function with aebb5fe now. This is definitely clearer, thanks for the suggestion
First and foremost: Yes, this idea is borrowed from Lutris' most recent release. I have however been meaning to do something like this for a long time, since I own several PCs affected by this as well
A lot of older GPUs don't support Vulkan 1.3, which DXVK versions > 1.X.X requires. For those users, the "Auto-Install DXVK" function was entirely useless, as the DXVK Heroic installs will never work on their system.
Now, Heroic will query the user's GPUs for their Vulkan support and install the older 1.10.3 version of DXVK if no Vulkan 1.3 support is detected.
Internally, this is done by:
Vulkan functions are called using a helper binary (https://github.com/imLinguin/vulkan-helper-rs)
Use the following Checklist if you have changed something on the Backend or Frontend: