Skip to content

Implement some horrible Forza Horizon 6 workarounds. - #3033

Merged
HansKristian-Work merged 6 commits into
masterfrom
forza-workarounds
May 29, 2026
Merged

Implement some horrible Forza Horizon 6 workarounds.#3033
HansKristian-Work merged 6 commits into
masterfrom
forza-workarounds

Conversation

@HansKristian-Work

@HansKristian-Work HansKristian-Work commented May 16, 2026

Copy link
Copy Markdown
Owner

This game is extremely broken:

This pulls in the rest of descriptor heap, since it's only reasonable way right now to get working benchmark without rendering glitches on my system. At best, this can be a hotfix branch or something.

Needs more investigation why the 32 + 32 RDNA2 style path doesn't quirk work. But it doesn't hang GPU anymore, so ... yay?

Adds sampler heap robustness too in dxil-spirv by just padding all sampler heaps to the 2048 limit. There is no room to pass down sampler heap size, so just clamp to constant 2047 instead, which is fine in practice. There are no null samplers, so we'll use whatever is there I guess when it's OOB.

Another issue is missing nonuniformEXT in RT shaders which I added force robustness for RT only to avoid crippling unrelated shaders. I only detected issues in this area in RT.

After that, we have the "lovely" bug of bad aliasing between image descriptors and buffer descriptors. The game first writes an image descriptor, then reads that as a plain buffer, which is broken, and on RDNA3/4 we would read the image descriptor at a 16b sliced offset, which breaks. This is the first instance of this causing issues in the wild. It was a known hazard point, but we have easy mitigation strategies on AMD at least. The only solution here that works is to force 64b layout where we can completely firewall off images and raw buffers.

There are also bugs with "use-before-alloc" where the application allocates resources after submit and writing descriptors pointing to them to the descriptor heap while GPU is in flight. Utter insanity, but FH5 had issues in this area too.

It's not been proven to cause a hang yet I think, but radv_wait_for_vm_map_updates=true is very likely going to be needed for safety.

The final bug around glitched RT was caused by the game forgetting to insert a barrier between BuildRTAS and TraceRaysIndirect ... Because of course.

@chrisvblemos

chrisvblemos commented May 17, 2026

Copy link
Copy Markdown

@HansKristian-Work Thanks for your work! Your workarounds managed to get me a few seconds in the benchmark before crashing with RT enabled. I am on AMD (9070XT).

I played around with LLM starting from this PR to try and see if I could get it to work on my side. I built the dlls with the found workaround and I got it to run the benchmark and not crash (screenshot below). I also played for around 30 minutes with no issues other than reflection/illumination flickering (which I think is unrelated to the issue here).

Screenshot_20260517_032507

The code is here: https://github.com/chrisvblemos/vkd3d-proton/tree/fh6-rdna4-descriptor-padding-fix . I removed the summary from the LLM since, as usual, it most likely contains nonsensical conclusions. What matters is the code that worked for me - even if it is a crime against humanity.

@trivarialthea

Copy link
Copy Markdown

Ran Proton Experimental (bleeding edge) with this package: https://github.com/HansKristian-Work/vkd3d-proton/actions/runs/25965821984. No crashes over 2 hours of playtime. Stutters are less frequent than with Proton-CachyOS but still present. Running on a 5090. Using the Ultra non-RT preset.

Compared to Windows, it is still a mess, both performance-wise and stutter-wise, making it quite unplayable with faster cars, but it is a lot better than anything else I tried. Stutters happen only when taking a sharp turn at high speeds; when cruising, it is fairly stable. Before trying this DXVK, it was stuttering every few seconds, no matter the speed. VSYNC does not impact this in any way.

@Polyfish0

Polyfish0 commented May 17, 2026

Copy link
Copy Markdown

Ran Proton Experimental (bleeding edge) with this package: https://github.com/HansKristian-Work/vkd3d-proton/actions/runs/25965821984. No crashes over 2 hours of playtime. Stutters are less frequent than with Proton-CachyOS but still present. Running on a 5090. Using the Ultra non-RT preset.

Compared to Windows, it is still a mess, both performance-wise and stutter-wise, making it quite unplayable with faster cars, but it is a lot better than anything else I tried. Stutters happen only when taking a sharp turn at high speeds; when cruising, it is fairly stable. Before trying this DXVK, it was stuttering every few seconds, no matter the speed. VSYNC does not impact this in any way.

I really does not want to bash nvidia here now. But even without this pr it is not unplayable on linux. I play on native 4k without any fsr technology with my 7900 xtx and i can drive perfectly fine with my 400kmh car. And yes I do have a 144hz monitor. This should fix a lot problems the game has with RDNA 3

@shelterx

Copy link
Copy Markdown

There's a fix needed for the nvidia driver.
https://forums.developer.nvidia.com/t/595-release-feedback-discussion/362561/433

@Polyfish0

Polyfish0 commented May 18, 2026 via email

Copy link
Copy Markdown

@serhii-nakon

Copy link
Copy Markdown

Hello @HansKristian-Work I just checked last artifacts and without RT on ultra settings with RX7900XTX it cause crash of AMDGPU and game itself
With RT it allow to start race for few seconds and hangs and also cause the same crashes
I use:
Proton-GE 10-34 and replace vkd3d-proton dlls with files from artifacts build 1h ago
Mesa GIT 26.1.0
Linux 7.0.4+deb13-amd64
Debian 13
Gnome 48

[  113.867378] amdgpu 0000:03:00.0: [gfxhub] page fault (src_id:0 ring:24 vmid:7 pasid:168)
[  113.867384] amdgpu 0000:03:00.0:  Process forzahorizon6.e pid 6389 thread vkd3d_queue pid 6725
[  113.867386] amdgpu 0000:03:00.0:   in page starting at address 0x00008000090c9000 from client 10
[  113.867388] amdgpu 0000:03:00.0: GCVM_L2_PROTECTION_FAULT_STATUS:0x00701431
[  113.867390] amdgpu 0000:03:00.0: 	 Faulty UTCL2 client ID: SQC (data) (0xa)
[  113.867392] amdgpu 0000:03:00.0: 	 MORE_FAULTS: 0x1
[  113.867394] amdgpu 0000:03:00.0: 	 WALKER_ERROR: 0x0
[  113.867395] amdgpu 0000:03:00.0: 	 PERMISSION_FAULTS: 0x3
[  113.867396] amdgpu 0000:03:00.0: 	 MAPPING_ERROR: 0x0
[  113.867397] amdgpu 0000:03:00.0: 	 RW: 0x0
[  113.867401] amdgpu 0000:03:00.0: [gfxhub] page fault (src_id:0 ring:24 vmid:7 pasid:168)
[  113.867402] amdgpu 0000:03:00.0:  Process forzahorizon6.e pid 6389 thread vkd3d_queue pid 6725
[  113.867404] amdgpu 0000:03:00.0:   in page starting at address 0x00008000090c9000 from client 10
[  113.867408] amdgpu 0000:03:00.0: [gfxhub] page fault (src_id:0 ring:24 vmid:7 pasid:168)
[  113.867409] amdgpu 0000:03:00.0:  Process forzahorizon6.e pid 6389 thread vkd3d_queue pid 6725
[  113.867411] amdgpu 0000:03:00.0:   in page starting at address 0x00008000090c9000 from client 10
[  113.867414] amdgpu 0000:03:00.0: [gfxhub] page fault (src_id:0 ring:24 vmid:7 pasid:168)
[  113.867416] amdgpu 0000:03:00.0:  Process forzahorizon6.e pid 6389 thread vkd3d_queue pid 6725
[  113.867417] amdgpu 0000:03:00.0:   in page starting at address 0x00008000090c9000 from client 10
[  113.867421] amdgpu 0000:03:00.0: [gfxhub] page fault (src_id:0 ring:24 vmid:7 pasid:168)
[  113.867422] amdgpu 0000:03:00.0:  Process forzahorizon6.e pid 6389 thread vkd3d_queue pid 6725
[  113.867424] amdgpu 0000:03:00.0:   in page starting at address 0x00008000090c9000 from client 10
[  113.867428] amdgpu 0000:03:00.0: [gfxhub] page fault (src_id:0 ring:24 vmid:7 pasid:168)
[  113.867429] amdgpu 0000:03:00.0:  Process forzahorizon6.e pid 6389 thread vkd3d_queue pid 6725
[  113.867430] amdgpu 0000:03:00.0:   in page starting at address 0x00008000090c9000 from client 10
[  115.900719] amdgpu 0000:03:00.0: Dumping IP State
[  115.902093] amdgpu 0000:03:00.0: Dumping IP State Completed
[  115.902134] amdgpu 0000:03:00.0: [drm] AMDGPU device coredump file has been created
[  115.902136] amdgpu 0000:03:00.0: [drm] Check your /sys/class/drm/card0/device/devcoredump/data
[  115.902137] amdgpu 0000:03:00.0: ring gfx_0.0.0 timeout, signaled seq=49632, emitted seq=49634
[  115.902139] amdgpu 0000:03:00.0:  Process forzahorizon6.e pid 6389 thread vkd3d_queue pid 6725
[  115.902141] amdgpu 0000:03:00.0: Starting gfx_0.0.0 ring reset
[  115.902262] amdgpu 0000:03:00.0: Ring gfx_0.0.0 reset succeeded
[  115.902265] amdgpu 0000:03:00.0: [drm] device wedged, but recovered through reset
[  331.563865] amdgpu 0000:03:00.0: [drm] PCIE GART of 512M enabled (table at 0x00000085FEB00000).
[  331.563891] amdgpu 0000:03:00.0: PSP is resuming...

PS: I also noticed that FH6 updated today
Screenshot From 2026-05-19 17-27-55

@HansKristian-Work

HansKristian-Work commented May 19, 2026

Copy link
Copy Markdown
Owner Author

@serhii-nakon are you saying this is a regression? I.e. that master is fine, but this PR is not?

That VA looks like yet another new class of bug that hasn't come up yet.

@serhii-nakon

Copy link
Copy Markdown

@HansKristian-Work Seems like regression or something changed in game with last update
With vkd3d from latest release - it allow to play with ultra settings without RT with almost zero stutters, with RT still issues
With vkd3d from artifacts from this PR it crash game with or without RT in race or during load screen

In both cases changed only vkd3d dll files
And command line for game RADV_EXPERIMENTAL=heap radv_wait_for_vm_map_updates=true PROTON_ENABLE_HDR=1 PROTON_ENABLE_WAYLAND=1 gnome-session-inhibit mangohud %command%

@HansKristian-Work

Copy link
Copy Markdown
Owner Author

With vkd3d from latest release

What is latest release referring to here? master or 3.0.1?

RADV_EXPERIMENTAL=heap

Well, you're enabling descriptor heap there. Try https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41680 without heap.

@serhii-nakon

Copy link
Copy Markdown

With vkd3d from latest release

What is latest release referring to here? master or 3.0.1?

RADV_EXPERIMENTAL=heap

Well, you're enabling descriptor heap there. Try https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41680 without heap.

Yes, 3.0.1,

OK I will build Mesa from PR branch but what proton I need to use - like release or from this PR or test both cases?

@serhii-nakon

Copy link
Copy Markdown

@HansKristian-Work I built Mesa from PR branch + Artifacts from this PR + radv_wait_for_vm_map_updates=true PROTON_ENABLE_HDR=1 PROTON_ENABLE_WAYLAND=1 gnome-session-inhibit mangohud %command% = Fixed RT (I completed race even with this stutter/slowdowns on high speed car with full ultra settings)

Only issue that still bother this strange slow downs of game despite frame rate still acceptable (like 60-40fps with RT and 100-60fps without RT) it still slowdown game - I got similar experience with FH5 on RX5500M - exactly the same...

@serhii-nakon

serhii-nakon commented May 19, 2026

Copy link
Copy Markdown

Forgot to mention that without RT this setup works too

@serhii-nakon

Copy link
Copy Markdown

But RT itself pretty strange by some reason - no cars in reflections and no environment in reflections
Screenshot From 2026-05-19 20-47-24

Screenshot From 2026-05-19 21-04-08

@serhii-nakon

serhii-nakon commented May 19, 2026

Copy link
Copy Markdown

Seems game not fully enable RT but FPS twice lower (or does not enable at all RT)

PS: next screenshots - the same place - just opposite side of view to show that it reflect something that not exists at all

With preset Extreme+RT
Screenshot From 2026-05-19 22-06-45
Screenshot From 2026-05-19 22-06-39

With preset Extreme (no RT)
Screenshot From 2026-05-19 22-07-42
Screenshot From 2026-05-19 22-07-37

@glowtape

glowtape commented May 19, 2026

Copy link
Copy Markdown

These workarounds seem to work pretty great for me. I cloned the latest proton-cachyos-slr, renamed it and dumped the DLLs from the artifacts in there to maintain an FH6 specific prefix.

Not using RT, because I keep reading that it causes issues on NVidia.

fh6b

(Heap, NTsync, XWayland, NVAPI, FIFO Latest Ready swapchain. This is also a dual monitor setup.)

No stutter whatsoever in the benchmark. I'm running this off XFS, tho, due to the higher IO throughput vs. btrfs. Haven't checked the game itself using e.g. mangohud or whatever, but it feels fluid.

--edit:
Just tried a benchmark run with raytraced GI and reflections set to High, it ran like 15 seconds and then locked up and crashed.

@serhii-nakon

Copy link
Copy Markdown

@glowtape try some high speed car and drive on this speed some time - I still have slowdowns with or without RT no matter - also I use EXT4 on SSD PCIe GEN5 10gbps so it should not be related with IO throughput at all

@sleepytariq

sleepytariq commented May 19, 2026

Copy link
Copy Markdown

@serhii-nakon This is probably an AMD-only issue and it is happening on Windows too, see this post.

Try setting Environment Texture Quality to the lowest value, This mostly fixed the stutters/slowdowns for me.

@serhii-nakon

Copy link
Copy Markdown

@sleepytariq More likely it related with game itself OR with related software - I saw that Nvidia users on Windows has the similar issue

@Cr0phiXx

Cr0phiXx commented May 20, 2026

Copy link
Copy Markdown

These workarounds seem to work pretty great for me. I cloned the latest proton-cachyos-slr, renamed it and dumped the DLLs from the artifacts in there to maintain an FH6 specific prefix.

Not using RT, because I keep reading that it causes issues on NVidia.
fh6b

(Heap, NTsync, XWayland, NVAPI, FIFO Latest Ready swapchain. This is also a dual monitor setup.)

No stutter whatsoever in the benchmark. I'm running this off XFS, tho, due to the higher IO throughput vs. btrfs. Haven't checked the game itself using e.g. mangohud or whatever, but it feels fluid.

--edit: Just tried a benchmark run with raytraced GI and reflections set to High, it ran like 15 seconds and then locked up and crashed.

I replaced the files aswell, did exactly the same, using the same proton. RTX 4080 here.
Started the game and at first it felt like the stutters or rather slowdowns were a lot less noticeable but just after 10 minutes of playing, it crashed again.
Enabling Raytracing leads to an instant crash the moment I close the Menu and the game tries to render 3D again.
Maybe I replaced the wrong files within the cachyos-proton-slr folder?

@HansKristian-Work
HansKristian-Work marked this pull request as ready for review May 20, 2026 09:40
@S34NW

S34NW commented May 20, 2026

Copy link
Copy Markdown

@glowtape try some high speed car and drive on this speed some time - I still have slowdowns with or without RT no matter - also I use EXT4 on SSD PCIe GEN5 10gbps so it should not be related with IO throughput at all

Apologies if this is further diverging from the topic of the PR. You can further mitigate the slowdowns by capping your FPS so that your GPU doesn't max out. When I set my FPS limit to 60 (My 9070xt was putting out ~90fps on Extreme at 5120x1440 without a limit) the slowdowns are almost completely gone.

@Polyfish0

Polyfish0 commented May 20, 2026

Copy link
Copy Markdown

Okay so I noticed that I never used the changes because the dll files from the artifacts got overwritten all the time. I got it to work by replacing the dll files inside proton itself but now FH6 is crashing. What was I supposed to do for installing the changes? I use mesa-git, i downloaded the dlls and i changed the environment variables accordingly to your pr description

Edit: Arch linux, KDE, RX 7900 XTX, 5800x

@serhii-nakon

Copy link
Copy Markdown

@Polyfish0 https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41680 try this PR - it fixed for me this issue - despite in game RT enabled it seems game itself doesn't render rt by some reason

@Blisto91

Copy link
Copy Markdown
Contributor

Try to keep the back and forth chatter out of the PR comments.

@HansKristian-Work
HansKristian-Work marked this pull request as ready for review May 27, 2026 17:43
Comment thread libs/vkd3d/command.c
* Also, if we ever transition between the modes, assume we need to resolve the hazard.
* Sometimes it's possible that RTAS batch gets flushed without appropriate barriers.
* There is no concrete proof of this being required yet, but it's a useful debug config. */
if (VKD3D_CONFIG_FLAG_IS_SET(EXTRA_RTAS_SYNC))

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

For review: These weren't needed in the end, but I wrote them and might be relevant for Witcher 3 debug, so why not ...

@serhii-nakon

Copy link
Copy Markdown

@HansKristian-Work I tested and seems it works with RT - but with latest game update they broke reflections at all (I mean even with older Proton GE where SSR worked just perfectly - now it broken partially, RT itself now renders but broken in similar way as SSR after game update...)

@HansKristian-Work

Copy link
Copy Markdown
Owner Author

RT itself now renders but broken in similar way as SSR after game update..

You need to post screenshots or a video. Note that the game has serious RT glitches too on AMD Windows.

@serhii-nakon

Copy link
Copy Markdown

@HansKristian-Work Yes here links to YT videos with records where SSR and RT quiet badly works after latest game update
https://youtu.be/MLdO9pzewjM - Proton GE 10-34 Vanila - SSR issue
https://youtu.be/G3OQzZJ02JQ - Proton GE 10-34 Replaced VKd3d - RT issue
https://youtu.be/78xjjtXp6mA - Proton GE 10-34 Replaced VKD3D - SSR issue

@serhii-nakon

Copy link
Copy Markdown

@HansKristian-Work Here also strange FPS drops when I shake camera in game - any rotation even very small cause game to drop FPS - it seems related with those issues where users has game slow downs/stutters

@serhii-nakon

Copy link
Copy Markdown

@HansKristian-Work PS: look at reflections on building - here disappear long distance objects from reflections and their quality very low - before update I had quality of real world mirror (even with SSR when object in camera view)

@HansKristian-Work

HansKristian-Work commented May 29, 2026

Copy link
Copy Markdown
Owner Author

Yes, but Windows AMD also looks just as broken. We did some side-by-side testing of the benchmark to confirm. Only conclusion is game bug where they rely on UB that AMD GPUs don't like. Anyway, there is nothing that should block this PR now. If there are further issues now, please make a new issue with side-by-side comparisons of Windows AMD and Linux RADV.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
The aggressive nonuniform isn't enough in all cases.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Avoid raw buffer <-> image aliasing.
The hardware is not actually robust against this for whatever reason
despite the HW docs saying it should be, so we have to place them at
RDNA2-style 32b offset to avoid the hangs.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
FH6 seems to rely on this not needing to be synced for some reason ...
At the very least, flushing RT batches when doing shading seems like a
good idea.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Same issue, sigh ...

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Comment thread libs/vkd3d/command.c
vkd3d_descriptor_debug_sync_validation_barrier(list->device->descriptor_qa_global_info,
list->device, list->cmd.vk_command_buffer);

/* Flush RTAS but don't sync against it, since the chance of false positive is very high.

@doitsujin doitsujin May 29, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

isn't the only possible scenario where this can go wrong going to involve ray queries anyway? Should be easy to work out if we ever need it.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

I'd think so, ye. We flush RTAS but don't sync for graphics, so I figured we should make it orthogonal at least.

@HansKristian-Work
HansKristian-Work merged commit 110e8bd into master May 29, 2026
6 checks passed
@HansKristian-Work
HansKristian-Work deleted the forza-workarounds branch May 29, 2026 12:33
@linoshkmalayil

Copy link
Copy Markdown

Yes, but Windows AMD also looks just as broken. We did some side-by-side testing of the benchmark to confirm. Only conclusion is game bug where they rely on UB that AMD GPUs don't like. Anyway, there is nothing that should block this PR now. If there are further issues now, please make a new issue with side-by-side comparisons of Windows AMD and Linux RADV.

I know this PR is merged and closed.
But I agree.
RT and SSR are broken on AMD GPUs even on Windows (Atleast on RX9070XT)

@JacekJagosz

Copy link
Copy Markdown

After this PR got merged do we still need to use any environment variables, like descriptor_heap?

@Arkaiid

Arkaiid commented May 31, 2026

Copy link
Copy Markdown

Hi! not to necro this but yall are miracle workers. tested this with https://github.com/CachyOS/proton-cachyos/releases/tag/cachyos-11.0-20260521-slr and it works like magic. stutters remain but I can cope with that. an hour and a half in and it has yet to crash ❤️

@jefmes

jefmes commented May 31, 2026

Copy link
Copy Markdown

Just wanted to also confirm, CachyOS with cachyos-11.0-20260521-slr, Ryzen 9800X3D and a Radeon 9070 XT, I'm able to play with Ultra RT enabled now with FSR 4.0.2 on Quality and hit my preferred target of just over 80 FPS. Great work guys, thank you for all your efforts!

image

@serhii-nakon

Copy link
Copy Markdown

Seems after this PR was merged to master in master branch stopped work PROTON_FSR4_RDNA3_UPGRADE=1 from Proton-GE 10-34

@codypearson

Copy link
Copy Markdown

Just wanted to thank you for your work on this; thanks to the descriptor heap fix I have FH6 running stably on Arch Linux/NVIDIA.

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.