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

Marvel's Guardians of the Galaxy (1088850) - NVIDIA issues - DLSS #1216

Open
SveSop opened this issue Sep 3, 2022 · 9 comments
Open

Marvel's Guardians of the Galaxy (1088850) - NVIDIA issues - DLSS #1216

SveSop opened this issue Sep 3, 2022 · 9 comments

Comments

@SveSop
Copy link
Contributor

SveSop commented Sep 3, 2022

Adapter: NVIDIA RTX2070
Driver: 515.49.15
OS: Ubuntu 20.04
Proton version: GE-Proton-7.31
Run settings: PROTON_LOG=1 PROTON_ENABLE_NVAPI=1 %command%

Enable DLSS + set options in the "launcher" window.
Steam log attached: steam_default.zip
Error: err:d3d12_command_signature_init_state_template: Root parameter 26 is not a raw VA. Cannot implement command signature which updates root descriptor.

Possible cause: When using PROTON_ENABLE_NVAPI=1 the option DXVK_ENABLE_NVAPI=1 is automagically set by the proton script, and maybe vkd3d runs a slightly different codepath when not being fooled into AMD mode?

Simple quick-fix to that:
Add this

        #if PROTON_ENABLE_NVAPI is set for NVIDIA adapter using vkd3d for Guardians of the Galaxy it will fail.
        if "SteamAppId" in os.environ:
            appid = os.environ["SteamAppId"]
            if os.environ["SteamAppId"] == "1088850":
                self.env["DXVK_ENABLE_NVAPI"] = "0"

below the lines that read

        if "enablenvapi" in self.compat_config:
            self.env["DXVK_ENABLE_NVAPI"] = "1"

in the proton script. This lets you start GotG without using DXVK_ENABLE_NVAPI=1 and it goes further. PS. You can no longer select DLSS in the launcher settings when doing that tho, but settings are saved from previous run.

Steam log attached: steam_no-dxvk-nvapi.zip

01f4:err:vkd3d_allocate_device_memory: Failed to allocate device memory (size 81920, type_flags 0x6, type_mask 0x3).
01f4:err:d3d12_resource_create_placed: Failed to create fallback committed resource.

Hmpf.. memory allocation error of sorts.

Reverted this PR #1147 , and yay.. a success!
Steam log attached: steam_OK.zip

Any chance this could be looked at?

steam_default.zip
steam_no-dxvk-nvapi.zip
steam_OK.zip

@doitsujin
Copy link
Collaborator

doitsujin commented Sep 4, 2022

VKD3D_CONFIG=force_raw_va_cbv should fix the first error message you quoted, however this will likely come at a significant performance cost. There's nothing we can do about that though, it is not possible to support the Nvidia fast path and complex ExecuteIndirect at the same time.

I'm having a hard time following the rest of your report (why exactly are we messing around with the Proton launch script?), not entirely sure what you're trying to tell us there.

As for the memory error, we're aware that linear memory allocations are currently broken and it is planned to rewrite this at some point, but I don't know why it would outright fail on your system. It really shouldn't, and it doesn't on my system.

@SveSop
Copy link
Contributor Author

SveSop commented Sep 7, 2022

VKD3D_CONFIG=force_raw_va_cbv should fix the first error message you quoted, however this will likely come at a significant performance cost. There's nothing we can do about that though, it is not possible to support the Nvidia fast path and complex ExecuteIndirect at the same time.

Sorry, i forgot to mention i already tried that, and the image is distorted (black flickering triangles even tho the menus work) as i mention here: #1169 (comment)

The game started if i use VKD3D_CONFIG=force_raw_va_cbv with DXVK_ENABLE_NVAPI=1, but image was distorted and flickering (although menu could be used).

I'm having a hard time following the rest of your report (why exactly are we messing around with the Proton launch script?), not entirely sure what you're trying to tell us there.

The reason for messing with the proton script is because if i do not do that, i have to use VKD3D_CONFIG=force_raw_va_cbv and the image is distorted and useless. "messing" with the proton script bypasses this by NOT setting DXVK_ENABLE_NVAPI=1 and thus bypassing this issue it seems. (Different codepath used for vkd3d?)

Sorry that i forgot to mention the earlier post in the closed thread, and that this hopefully explain the reasoning why force_raw_va_cbv did not work (for me).

As for the memory error, we're aware that linear memory allocations are currently broken and it is planned to rewrite this at some point, but I don't know why it would outright fail on your system. It really shouldn't, and it doesn't on my system.

I do not know what would be broken on my system. Perhaps some distro differences? Kernel? System settings? (Not using any particular settings that i am aware of that would change default steam proton settings, but i might need some perhaps?)

@jp7677
Copy link
Contributor

jp7677 commented Jun 9, 2023

Short update on Guardians of the Galaxy on NVIDIA (Ampere, 530.41.03) with vkd3d-proton f52e648:

  • Game runs normal when spoofing AMD.
  • Games needs force_raw_va_cbv to avoid startup crash (to avoid Root parameter 26 is not a raw VA....) when NVIDIA is visible, but when being in the menu and in-game it looks like vertex/geometry explosions/flickering all over the place (I have no better description, its probably something else) , but menu/interface is visible and e.g. benchmark can be started and finishes. PR Do not attempt to place linear host visible textures on heaps. #1147 mentioned similar symptoms (as far as I can judge) and fixes that for AMD.
  • DLSS/nvapi shows nothing unusual, DLSS starts and seems to work.
  • When exposing dxr, the game crashes during startup on the 530 driver, because the driver doesn't has VK_EXT_pipeline_library_group_handles yet (at least the last fixme in vkd3d logs indicates this https://github.com/HansKristian-Work/vkd3d-proton/blob/master/libs/vkd3d/raytracing_pipeline.c#L262) I don't know what happens when that extension is present.

This is essentially still the same status as described above.

@jp7677
Copy link
Contributor

jp7677 commented Jun 11, 2023

The easiest work around for still having DLSS in this game is the following:

  • Enable NVAPI for this game (e.g. PROTON_ENABLE_NVAPI=1)
  • Enable DLSS in the launcher
  • Quit the launcher
  • Place a dxvk.conf containing dxgi.customVendorId = 1002 next to gotg.exe for spoofing AMD
  • Start and enjoy the game! It now uses the AMD path which works fine with an NVIDIA GPU and surprisingly still enables DLSS!

Note, this requires jp7677/dxvk-nvapi@a2235c8

@SveSop no need to hack the proton script ;)

PS: Unfortunately the launcher is the same executable as the game itself, so we cannot create an application profile to implement this work around more elegantly.

@jp7677
Copy link
Contributor

jp7677 commented Jun 17, 2023

About the ray tracing features, those can be enabled and do work when using the NVIDIA 535 driver and Proton Experimental Bleeding Edge i.c.w. exposing VKD3D dxr option. Proton Bleeding Edge is (currently) needed because it ships an update winevulkan that reports VK_EXT_pipeline_library_group_handles when the driver knows this extension.

The RT features are available when spoofing AMD and also when exposing NVIDIA (needs dxr,force_raw_va_cbv), but the explosions/flickering is obviously still there with the NVIDIA path. Note though that the DLSS trick from the former posting prevents RT from being enabled, so when spoofing AMD it is either enjoying DLSS (by enabling NVAPI) or enjoying RT (by not enabling NVAPI), but not both.

@HansKristian-Work
Copy link
Owner

@runar-work Can you test this game with VKD3D_CONFIG=force_raw_va_cbv and DXVK_ENABLE_NVAPI=1 on recent NV drivers?

@runar-work
Copy link
Contributor

Tested with RTX 4070 and 545.29.6, and any attempts I made to skip AMD spoofing lead to massive vertex explosions, so seems there's still no way to get both DLSS and RT.

@shelterx
Copy link

Still does the same thing on 550.40.55, lot's of vertex explosions.
So NVAPI needs to be disabled. which it is by default in Proton 9 for GOTG.

@shelterx
Copy link

I guess this game will never work with NVAPI and DLSS and RT combined?
Even if the vertex explosions go way the performance drop isn't going to be fun.

Sidenote, there's a slight FPS increase in this game with dev 550.40.75 with RT on. Which's good I guess, let's hope it stays that way.

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

No branches or pull requests

6 participants