Fix RADV lighting, water, and facial animation on wide heaps #183

Open
github-bot wants to merge 1 commit from github-bot/gh-183 into main AGit
Owner

@⁠iws322112 on GitHub · 2026-12-05 20:49 UTC · original
iws322112:fix/radv-rendering → main · +265 −36 · 14 files · 1 commits · open

Summary

  • Use the translated lighting shaders on wide descriptor heaps when a portable replacement embeds 1M-slot indices. Build the affected water and facial replacements for both supported heap sizes and supply bindings for two water transmission passes that otherwise drop.
  • Handle partial-wave FP16 sums on 64-lane hosts and keep the facial expression workspace in group-shared memory. The wave-sum work overlaps #23 and credits its larp-linux ports. The jaw replacement addresses a separate incorrect shader result.
  • Add 120/240 Hz options, retain the title's slower clock requests, and make deferral of already-cached compute pipelines opt-in. Stream pipeline cache writes in bounded buffers.

Test environment

Component Configuration
CPU and memory AMD Ryzen 7 9800X3D, 32 GB RAM
GPU AMD Radeon RX 9070 XT (RDNA 4, GFX1201)
Host CachyOS, Linux 7.2.15, KDE Plasma on Wayland
Graphics stack Mesa RADV 26.3.1, system Wine 11.23, VKD3D-Proton 3.2.0 (build 71cae091b06571e), DXVK 3.1.1
Test workload Xbox Series X build, same copied deck save, 3840×2160 HDR10, FSR Quality and 2× frame generation requested in the profile
Isolation Bubblewrap with networking disabled. Both runs used the same GPU driver and runtime DLLs.
  • #110 reports story-character facial deformation on Proton/RADV even when the shaders translate. This PR fixes the stuck-open jaw on the tested RX 9070 XT and corrects the facial shader output in an offline Radeon replay.
  • #44 reports the same four compute translation failures and 14 skipped rendering operations per frame. The tested Linux deck scene went from a nearly black foreground and 14 skips per frame to visible lighting and zero skips. The exact Windows/RX 7900 XTX setup in the report has yet to be retested.
  • #21 reports black textures and lighting issues on the same CPU/GPU combination. The deck reproduction above is relevant.
  • #82 reports black underwater rendering. Both previously skipped water transmission shaders loaded with this change. A separate underwater playthrough remains unverified.

Verification

  • Cross-built the rebased branch for Windows x86-64 MSVC on Linux. DXC compiled both heap variants of the jaw shader with the same hashes as the tested build.
  • In an offline 3840×2160 HDR10 deck comparison on an RX 9070 XT, the upstream renderer left the foreground very dark and reported 14 skipped rendering operations per frame. The patched renderer kept upstream's HDR10 output, restored daylight and the closed idle jaw, and reported zero skipped operations. The two samples performed different amounts of rendering work, so the FPS figures do not establish a performance gain.
  • On the same GPU, the upstream facial shader returned about 207 in two output slots where the reference values were about 0.049 and zero. The replacement matched the xmem output byte for byte for four captured inputs. The visual test used Wine and RADV. Native Windows and NVIDIA coverage remain open.

Install the executable with the full built shader-replace tree, including heap-2097152.

**@⁠iws322112** on GitHub · 2026-12-05 20:49 UTC · [original](https://github.com/gamingwithhomie/larp/pull/183) `iws322112:fix/radv-rendering` → `main` · +265 −36 · 14 files · 1 commits · open ## Summary - Use the translated lighting shaders on wide descriptor heaps when a portable replacement embeds 1M-slot indices. Build the affected water and facial replacements for both supported heap sizes and supply bindings for two water transmission passes that otherwise drop. - Handle partial-wave FP16 sums on 64-lane hosts and keep the facial expression workspace in group-shared memory. The wave-sum work overlaps [#23](https://git.gtahub.st/github/gamingwithhomie--larp/pulls/23) and credits its larp-linux ports. The jaw replacement addresses a separate incorrect shader result. - Add 120/240 Hz options, retain the title's slower clock requests, and make deferral of already-cached compute pipelines opt-in. Stream pipeline cache writes in bounded buffers. ## Test environment | Component | Configuration | | --- | --- | | CPU and memory | AMD Ryzen 7 9800X3D, 32 GB RAM | | GPU | AMD Radeon RX 9070 XT (RDNA 4, GFX1201) | | Host | CachyOS, Linux 7.2.15, KDE Plasma on Wayland | | Graphics stack | Mesa RADV 26.3.1, system Wine 11.23, VKD3D-Proton 3.2.0 (build `71cae091b06571e`), DXVK 3.1.1 | | Test workload | Xbox Series X build, same copied deck save, 3840×2160 HDR10, FSR Quality and 2× frame generation requested in the profile | | Isolation | Bubblewrap with networking disabled. Both runs used the same GPU driver and runtime DLLs. | ## Related issues - #110 reports story-character facial deformation on Proton/RADV even when the shaders translate. This PR fixes the stuck-open jaw on the tested RX 9070 XT and corrects the facial shader output in an offline Radeon replay. - #44 reports the same four compute translation failures and 14 skipped rendering operations per frame. The tested Linux deck scene went from a nearly black foreground and 14 skips per frame to visible lighting and zero skips. The exact Windows/RX 7900 XTX setup in the report has yet to be retested. - #21 reports black textures and lighting issues on the same CPU/GPU combination. The deck reproduction above is relevant. - #82 reports black underwater rendering. Both previously skipped water transmission shaders loaded with this change. A separate underwater playthrough remains unverified. ## Verification - Cross-built the rebased branch for Windows x86-64 MSVC on Linux. DXC compiled both heap variants of the jaw shader with the same hashes as the tested build. - In an offline 3840×2160 HDR10 deck comparison on an RX 9070 XT, the upstream renderer left the foreground very dark and reported 14 skipped rendering operations per frame. The patched renderer kept upstream's HDR10 output, restored daylight and the closed idle jaw, and reported zero skipped operations. The two samples performed different amounts of rendering work, so the FPS figures do not establish a performance gain. - On the same GPU, the upstream facial shader returned about 207 in two output slots where the reference values were about 0.049 and zero. The replacement matched the xmem output byte for byte for four captured inputs. The visual test used Wine and RADV. Native Windows and NVIDIA coverage remain open. Install the executable with the full built `shader-replace` tree, including `heap-2097152`.
Keep upstream HDR10 presentation while selecting correctly sized shader replacements.

The masked FP16 wave-sum work overlaps PR #23 and its larp-linux ports.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 20:52:57 +00:00
Author
Owner

@⁠gamingwithhomie on GitHub · 2026-12-05 20:53 UTC · original

Thank you - this is exactly the #110/#44/#21 RADV cluster, and the offline Radeon replay + same-save A/B is the right way to prove it. Flagging for a dedicated review pass rather than a fast merge: it bundles several things (wide-heap dual-size replacements + new shaders/replace sources, FP16 partial-wave sums, facial workspace in groupshared, 120/240 Hz options, pipeline-cache streaming, an apps/larp/build.rs change), and it interacts with our amd-test tracks PORTABLE_VIEWS 1M cap - we need to check whether the dual-heap-size approach replaces that cap or should coexist with it, and how updated replacement shaders get rebuilt into the release packages (they currently ship prebuilt DXIL). v1.1.1 (just published) already asks #110 reporters to retest + try LARP_HOST_WAVE=32; your results there would help scope this. Full review next round.

**@⁠gamingwithhomie** on GitHub · 2026-12-05 20:53 UTC · [original](https://github.com/gamingwithhomie/larp/pull/183#issuecomment-7445193810) Thank you - this is exactly the #110/#44/#21 RADV cluster, and the offline Radeon replay + same-save A/B is the right way to prove it. Flagging for a dedicated review pass rather than a fast merge: it bundles several things (wide-heap dual-size replacements + new `shaders/replace` sources, FP16 partial-wave sums, facial workspace in groupshared, 120/240 Hz options, pipeline-cache streaming, an `apps/larp/build.rs` change), and it interacts with our amd-test tracks PORTABLE_VIEWS 1M cap - we need to check whether the dual-heap-size approach replaces that cap or should coexist with it, and how updated replacement shaders get rebuilt into the release packages (they currently ship prebuilt DXIL). v1.1.1 (just published) already asks #110 reporters to retest + try `LARP_HOST_WAVE=32`; your results there would help scope this. Full review next round.
Author
Owner

@⁠iws322112 on GitHub · 2026-12-05 20:58 UTC · original

Thanks. The dual-size replacements can coexist with the amd-test cap. The default DXIL uses the 1,000,000-slot layout, and the loader picks the heap-2097152/ variant only when the runtime selects that heap size. The cap therefore remains a valid choice for the 1M path. I verified the wide path on RADV. I have yet to run the capped path on hardware.

For packaging, apps/larp/build.rs generates both variants with DXC. A package that ships prebuilt DXIL would copy the regenerated target/shader-replace/ tree recursively, including heap-2097152/ and the interface sidecars. A build that enforces the cap only needs the 1M files.

The same-save baseline in the description was built from cf5e530. It has the same runtime code as the v1.1.1 tag at 8e166ad (the intervening commit changes the README). It selected 2,097,152 view slots and reported 32–64 lane support on the 9070 XT. The captured facial compute dispatch still produced jaw values around 207 with the upstream translator versus about 0.049 and 0 in the reference. I checked the wave override too. The tag's game-launch path reads the device's reported lane limit, while amd-test reads LARP_HOST_WAVE as an override. The tag exposes LARP_HOST_MAX_WAVE for the standalone translator. The baseline therefore provides a default-path result only, and I don't have a forced-wave32 gameplay result to report yet.

**@⁠iws322112** on GitHub · 2026-12-05 20:58 UTC · [original](https://github.com/gamingwithhomie/larp/pull/183#issuecomment-7445262512) Thanks. The dual-size replacements can coexist with the amd-test cap. The default DXIL uses the 1,000,000-slot layout, and the loader picks the `heap-2097152/` variant only when the runtime selects that heap size. The cap therefore remains a valid choice for the 1M path. I verified the wide path on RADV. I have yet to run the capped path on hardware. For packaging, `apps/larp/build.rs` generates both variants with DXC. A package that ships prebuilt DXIL would copy the regenerated `target/shader-replace/` tree recursively, including `heap-2097152/` and the interface sidecars. A build that enforces the cap only needs the 1M files. The same-save baseline in the description was built from `cf5e530`. It has the same runtime code as the `v1.1.1` tag at `8e166ad` (the intervening commit changes the README). It selected 2,097,152 view slots and reported 32–64 lane support on the 9070 XT. The captured facial compute dispatch still produced jaw values around 207 with the upstream translator versus about 0.049 and 0 in the reference. I checked the wave override too. The tag's game-launch path reads the device's reported lane limit, while amd-test reads `LARP_HOST_WAVE` as an override. The tag exposes `LARP_HOST_MAX_WAVE` for the standalone translator. The baseline therefore provides a default-path result only, and I don't have a forced-wave32 gameplay result to report yet.
Author
Owner

@⁠gamingwithhomie on GitHub · 2026-12-05 21:18 UTC · original

Merged to the amd-test and linux-test branches (not main yet, per review: ~65 replacements still embed the 1M slot constants, and the new facial replacement is untested on NVIDIA) and shipped in v1.1.2-amd + the v1.1.2 Linux/Proton build. One build fix was needed: the -validator-version 1.9 pin broke builds on Windows SDK dxc 1.8 (incl. AmericasLauncher source builds, #154), so its dropped - the emitted DXIL matches every existing replacement. Release packages now ship the freshly built bin\shader-replace including heap-2097152\ (UPDATE zips carry it too). The portable-heap cap stays on the AMD build as the safety net for unconverted replacements. Main-branch merge can follow once the remaining constants are converted/listed or proven unreachable. Thank you - this was the #110/#179 fix!

**@⁠gamingwithhomie** on GitHub · 2026-12-05 21:18 UTC · [original](https://github.com/gamingwithhomie/larp/pull/183#issuecomment-7445537198) Merged to the **amd-test** and **linux-test** branches (not main yet, per review: ~65 replacements still embed the 1M slot constants, and the new facial replacement is untested on NVIDIA) and shipped in **v1.1.2-amd** + the **v1.1.2 Linux/Proton** build. One build fix was needed: the `-validator-version 1.9` pin broke builds on Windows SDK dxc 1.8 (incl. AmericasLauncher source builds, #154), so its dropped - the emitted DXIL matches every existing replacement. Release packages now ship the freshly built `bin\shader-replace` including `heap-2097152\` (UPDATE zips carry it too). The portable-heap cap stays on the AMD build as the safety net for unconverted replacements. Main-branch merge can follow once the remaining constants are converted/listed or proven unreachable. Thank you - this was the #110/#179 fix!
github-bot force-pushed github-bot/gh-183 from ec5ed24117 to 3e61a0c2d0 2026-12-05 23:51:21 +00:00 Compare
This pull request has changes conflicting with the target branch.
  • crates/larp-gpu/src/pipeline/blobs.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/183/head:github-bot/gh-183'
git switch 'github-bot/gh-183'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-183'
git switch 'github-bot/gh-183'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-183'
git switch 'github-bot/gh-183'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-183'
git switch 'main'
git merge --squash 'github-bot/gh-183'
git switch 'main'
git merge --ff-only 'github-bot/gh-183'
git switch 'main'
git merge 'github-bot/gh-183'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.