fix(shader): preserve uniform MUFU source modifiers #2865

Merged
HumanBean merged 3 commits from futondestroyer/Longshot:codex/mufu-uniform-modifiers-wip into main 2026-12-05 18:56:44 +00:00
Member

Summary

Preserve absolute value and negation on Ampere MUFU with a uniform-register source. The C++ lowerer previously emitted the same source for MUFU.RCP -UR4 and MUFU.RCP UR4. Use the existing Maxwell modifier fields for operations that lower to one word, and apply the modifiers before converting turns to radians for SIN and COS. The one-word reciprocal still accepts high destination registers.

Start at gpu/vk/eden/shader_recompiler/frontend/ampere/lower_to_maxwell.h and tests/test_lower_mufu_uniform_modifiers.py. Gummi reported the missing modifier. Mesa's Ampere encoder

Testing

Tested: Windows with an RTX 4070 and NVIDIA driver 621.01. The exact renderer pack at eb2bff03, based on 9b342b46, loaded through renderer ABI 56. With shaders compiled on demand, the disposable Kokiri Forest checkpoint stayed in play for 240 presents and quit cleanly. The authored checks isolate the shader bug.

The authored regression failed on 9b342b46 and passed on eb2bff03 with Clang and GCC. It covers reciprocal, absolute value, negative zero, predicated sine before scaling, and a reciprocal targeting R251. The test rejects the superseded multiword lowering of the high-register reciprocal. Independent source review verified both exact maps and found no remaining issues.

The matched tests/run_all.py --strict --jobs 4 --timeout 1200 runs on the previous base 53ab0ceb finished with 815 passes, 47 failures and 47 skips on main. The patch had 816 passes, the same 47 failures and the same 47 skips. The additional pass is tests/test_lower_mufu_uniform_modifiers.py.

Shared failures in tests/: test_auto_handheld.py, test_bug_report.py, test_builder_channel.py, test_control_picture.py, test_coverage_run.py, test_crash_record.py, test_crt_options.py, test_dev_ab.py, test_dev_build.py, test_dev_migrate.py, test_dev_packs.py, test_dev_update.py, test_framegen_hdr.py, test_framegen_resources.py, test_fs_path_utf8.py, test_image_view_retry.py, test_input_background.py, test_keyboard_menu_option.py, test_keyboard_option.py, test_lifter.py, test_linux_pressure.py, test_loaded_modules_drop.py, test_log_batch.py, test_log_levels.py, test_menu_keys.py, test_mods_list.py, test_oot_menu_mouse.py, test_oot_state_tap.py, test_option_ids.py, test_parity_gates.py, test_perf_send.py, test_present_source_crop.py, test_program_cache_cleanup.py, test_program_cache_one_variant.py, test_program_cache_store_record.py, test_run_all_mingw.py, test_screensaver.py, test_switch_table.py, test_temporal_present_bandwidth.py, test_text_keyboard_policy.py, test_upscaler_round_trip.py, test_vcore_video_acquire.py, test_video_catchup.py, test_video_hold_early.py, test_video_input_limit.py, test_windows_display_startup.py, test_windows_on_linux.py.

Review follow-up efdb748c makes the standalone fixture use CXX as its default. Clang and GCC each pass when selected through CXX, and an intentionally missing compiler distinguishes the new behavior from the former Clang fallback. Explicit --cxx still wins, and the PATH fallback works when CXX is unset. Ruff passed. The compiler-selection commit changes only the fixture. The gameplay run above remains pinned to its original renderer pack.

The follow-up integrates cleanly with official main 55773e36 at tree 3a371799. The fixture reproduced the missing negate on exact main with both compilers and passed on that integration tree. The integration into c18c0011 previously kept the shader inputs byte-identical and passed the async ASTC upload, ASTC chunking, and draw-stream visibility checks.

The affected Windows checks on the published base had 131 passes, 7 failures and 9 skips. The patch had 144 passes, the same 7 failures, and the same 9 skips. The two timing-sensitive outliers on the intermediate full MUFU run both passed a serial retry.

On integration base 3b18a4a9, the authored regression again failed on main and passed on prospective head 8b735a50 with Clang and GCC. The eviction-retirement and SIEVE/size-class fixtures passed on main and this integration. test_vram_compact.py reports the same existing texture_frame() source-pattern mismatch on both.

Historical CI on eb2bff03 failed Rust, Guide, Website, and both Linux game-free shards. All 34 failing Linux fixtures matched the first diagnostics on the sibling shader and Builder PRs. The shared Windows main comparison reproduced all 54 Builder-head failures on 28cb22b9. That comparison is Windows evidence. The newer sibling Linux run passed Rust after the upstream lint fix. Exact pinned-main CI was still pending at this update.

Still to test:

  • Run the Kokiri Forest smoke on AMD RX 6000–9000 with Windows and Linux, NVIDIA RTX on Linux, and Steam Deck. Check for stable rendering and record the GPU and driver (by hand).

Measurements

Correctness fix. For RCP -UR4 with UR4 = -2.0, main feeds c0000000 to MUFU and the fix feeds 40000000. For a negated zero source, main feeds 00000000 and the fix feeds 80000000.

Risks

Changed behavior is scoped to Ampere MUFU's uniform source form. The C++ frontend's shader stamp includes the affected source, which refreshes generated shader caches with the normal preparation path. The test covers operand words and guards with authored instructions. Hardware precision and broader scene coverage depend on the device and game run.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.
## Summary Preserve absolute value and negation on Ampere `MUFU` with a uniform-register source. The C++ lowerer previously emitted the same source for `MUFU.RCP -UR4` and `MUFU.RCP UR4`. Use the existing Maxwell modifier fields for operations that lower to one word, and apply the modifiers before converting turns to radians for SIN and COS. The one-word reciprocal still accepts high destination registers. Start at `gpu/vk/eden/shader_recompiler/frontend/ampere/lower_to_maxwell.h` and `tests/test_lower_mufu_uniform_modifiers.py`. Gummi reported the missing modifier. [Mesa's Ampere encoder](https://chromium.googlesource.com/external/gitlab.freedesktop.org/mesa/mesa/%2B/61a2e907f1d6e4a8432d91d0fde5d439a875fbbe/src/nouveau/compiler/nak/sm70_encode.rs) ## Testing **Tested:** Windows with an RTX 4070 and NVIDIA driver 621.01. The exact renderer pack at `eb2bff03`, based on `9b342b46`, loaded through renderer ABI 56. With shaders compiled on demand, the disposable Kokiri Forest checkpoint stayed in play for 240 presents and quit cleanly. The authored checks isolate the shader bug. The authored regression failed on `9b342b46` and passed on `eb2bff03` with Clang and GCC. It covers reciprocal, absolute value, negative zero, predicated sine before scaling, and a reciprocal targeting R251. The test rejects the superseded multiword lowering of the high-register reciprocal. Independent source review verified both exact maps and found no remaining issues. The matched `tests/run_all.py --strict --jobs 4 --timeout 1200` runs on the previous base `53ab0ceb` finished with 815 passes, 47 failures and 47 skips on main. The patch had 816 passes, the same 47 failures and the same 47 skips. The additional pass is `tests/test_lower_mufu_uniform_modifiers.py`. Shared failures in `tests/`: `test_auto_handheld.py`, `test_bug_report.py`, `test_builder_channel.py`, `test_control_picture.py`, `test_coverage_run.py`, `test_crash_record.py`, `test_crt_options.py`, `test_dev_ab.py`, `test_dev_build.py`, `test_dev_migrate.py`, `test_dev_packs.py`, `test_dev_update.py`, `test_framegen_hdr.py`, `test_framegen_resources.py`, `test_fs_path_utf8.py`, `test_image_view_retry.py`, `test_input_background.py`, `test_keyboard_menu_option.py`, `test_keyboard_option.py`, `test_lifter.py`, `test_linux_pressure.py`, `test_loaded_modules_drop.py`, `test_log_batch.py`, `test_log_levels.py`, `test_menu_keys.py`, `test_mods_list.py`, `test_oot_menu_mouse.py`, `test_oot_state_tap.py`, `test_option_ids.py`, `test_parity_gates.py`, `test_perf_send.py`, `test_present_source_crop.py`, `test_program_cache_cleanup.py`, `test_program_cache_one_variant.py`, `test_program_cache_store_record.py`, `test_run_all_mingw.py`, `test_screensaver.py`, `test_switch_table.py`, `test_temporal_present_bandwidth.py`, `test_text_keyboard_policy.py`, `test_upscaler_round_trip.py`, `test_vcore_video_acquire.py`, `test_video_catchup.py`, `test_video_hold_early.py`, `test_video_input_limit.py`, `test_windows_display_startup.py`, `test_windows_on_linux.py`. Review follow-up `efdb748c` makes the standalone fixture use `CXX` as its default. Clang and GCC each pass when selected through `CXX`, and an intentionally missing compiler distinguishes the new behavior from the former Clang fallback. Explicit `--cxx` still wins, and the PATH fallback works when `CXX` is unset. Ruff passed. The compiler-selection commit changes only the fixture. The gameplay run above remains pinned to its original renderer pack. The follow-up integrates cleanly with official main `55773e36` at tree `3a371799`. The fixture reproduced the missing negate on exact main with both compilers and passed on that integration tree. The integration into `c18c0011` previously kept the shader inputs byte-identical and passed the async ASTC upload, ASTC chunking, and draw-stream visibility checks. The affected Windows checks on the published base had 131 passes, 7 failures and 9 skips. The patch had 144 passes, the same 7 failures, and the same 9 skips. The two timing-sensitive outliers on the intermediate full MUFU run both passed a serial retry. On integration base `3b18a4a9`, the authored regression again failed on main and passed on prospective head `8b735a50` with Clang and GCC. The eviction-retirement and SIEVE/size-class fixtures passed on main and this integration. `test_vram_compact.py` reports the same existing `texture_frame()` source-pattern mismatch on both. Historical [CI on `eb2bff03`](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/58215) failed Rust, Guide, Website, and both Linux game-free shards. All 34 failing Linux fixtures matched the first diagnostics on the sibling shader and Builder PRs. The shared [Windows main comparison](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2872#issuecomment-93513) reproduced all 54 Builder-head failures on `28cb22b9`. That comparison is Windows evidence. The newer [sibling Linux run](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/58634) passed Rust after the upstream lint fix. Exact [pinned-main CI](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/58874) was still pending at this update. **Still to test:** - Run the Kokiri Forest smoke on AMD RX 6000–9000 with Windows and Linux, NVIDIA RTX on Linux, and Steam Deck. Check for stable rendering and record the GPU and driver (by hand). ## Measurements Correctness fix. For `RCP -UR4` with `UR4 = -2.0`, main feeds `c0000000` to MUFU and the fix feeds `40000000`. For a negated zero source, main feeds `00000000` and the fix feeds `80000000`. ## Risks Changed behavior is scoped to Ampere MUFU's uniform source form. The C++ frontend's shader stamp includes the affected source, which refreshes generated shader caches with the normal preparation path. The test covers operand words and guards with authored instructions. Hardware precision and broader scene coverage depend on the device and game run. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold.
Assisted-by: OpenAI Codex (GPT-6.2 Sol)
Co-Authored-By: OpenAI Codex <[email protected]>
fix(shader): preserve uniform MUFU source modifiers
Some checks failed
CI / What the change needs (pull_request) Successful in 10s
CI / Third-party parts and guide screenshots (pull_request) Failing after 14s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 17s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m7s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m44s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m3s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m15s
CI / Website build and checks (pull_request) Failing after 35s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 18m30s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 40m20s
eb2bff032c
Use the Maxwell operand bits to keep non-trig MUFU single-word.
Apply the sign modifiers before the existing turns-to-radians
conversion for SIN and COS.

Assisted-by: OpenAI Codex (GPT-6.2 Sol)
Co-Authored-By: OpenAI Codex <[email protected]>
Author
Member

Tested in game: Windows, GeForce RTX 4070, NVIDIA driver 621.01, renderer ABI 56. Exact pack eb2bff03 on base 9b342b46 entered Kokiri Forest, rendered 240 presents in play with on-demand shaders, and quit cleanly.

Tested in game: Windows, GeForce RTX 4070, NVIDIA driver 621.01, renderer ABI 56. Exact pack eb2bff03 on base 9b342b46 entered Kokiri Forest, rendered 240 presents in play with on-demand shaders, and quit cleanly.
futondestroyer changed title from WIP: fix(shader): preserve uniform MUFU source modifiers to fix(shader): preserve uniform MUFU source modifiers 2026-11-30 04:30:56 +00:00
BeanBot left a comment

Recommendation: Approve. The authored regression demonstrates the lost uniform-source modifiers and the fix preserves them in the reviewed lowering paths. Rendering coverage is still needed on affected Tier 1 systems, and the head CI checks are pending. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

Preserves absolute-value and negation modifiers on uniform sources to Ampere MUFU instructions, including applying them before sine and cosine scaling. Non-trigonometric operations remain single-word; modified trigonometric sources require additional lowering instructions.

Should fix (1): not blocking, but worth doing before merging.

  • L1 tests/test_lower_mufu_uniform_modifiers.py:104: The standalone test ignores the CXX environment variable when choosing its compiler. (more on the line) Do: Use CXX as the first default when set, while retaining the explicit --cxx override and compiler fallback.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L2 gpu/vk/eden/shader_recompiler/frontend/ampere/lower_to_maxwell.h:2763: The changed shader lowering has not yet been exercised on the remaining affected Tier 1 systems. (more on the line) Do: Run the Kokiri Forest rendering smoke on AMD RX 6000–9000 on Windows and Linux, Steam Deck, and NVIDIA on Linux; report the hardware, driver and results.

@fix can do L1.

Checks: Failing on this head, which is behind its base, where it passes: CI / Third-party parts and guide screenshots (pull_request). @rebase (or @fix) brings it up to date and runs it again; not held against it. Cancelled on this head (no result): PR description / Title and description (pull_request_target). Still running: 7 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes for the authored cases: the PR reports RCP -UR4 changing from input c0000000 to 40000000 and negated zero from 00000000 to 80000000. Its regression reportedly fails on base 9b342b46 and passes on eb2bff03 with Clang and GCC; broader game rendering remains to be tested.

Other systems: The lowering feeds the Maxwell shader translator on all Vulkan devices, so the change can affect NVIDIA, AMD and Steam Deck rendering on Windows and Linux. The reported RTX 4070 Windows smoke ran 240 presents; AMD, Steam Deck and NVIDIA Linux coverage is not reported.

Switches: None added, changed or removed.

Reviewed: eb2bff032c against 9b342b464c: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the pull request template, the full diff, both commit messages, the new test, the changed MUFU block, its operand and register-mapping helpers, and the Maxwell MUFU translator. Skimmed the rest of the large lowerer and the test runner; docs/review-checklist.md and ../Tooling/AGENTS.md were absent.; nothing run (a code review).

Checked and fine:

  • The Maxwell translator reads the emitted absolute and negate fields at bits 46 and 48.
  • The trigonometric path applies modifiers before the turns-to-radians multiplication and retains the instruction predicate.
  • Both commits record AI assistance; no generated files, game-derived files, API versions or switch definitions are changed.

Testing: No code or tests were run for this review. The PR reports a Windows RTX 4070 game smoke and base-versus-head authored regression runs; the listed head CI checks are still running.

Overlaps and merge order: Not established from the offline checkout.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as futondestroyer took it out of WIP. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The authored regression demonstrates the lost uniform-source modifiers and the fix preserves them in the reviewed lowering paths. Rendering coverage is still needed on affected Tier 1 systems, and the head CI checks are pending. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. Preserves absolute-value and negation modifiers on uniform sources to Ampere MUFU instructions, including applying them before sine and cosine scaling. Non-trigonometric operations remain single-word; modified trigonometric sources require additional lowering instructions. **Should fix (1)**: not blocking, but worth doing before merging. - **L1** `tests/test_lower_mufu_uniform_modifiers.py:104`: The standalone test ignores the CXX environment variable when choosing its compiler. (more on the line) **Do:** Use CXX as the first default when set, while retaining the explicit --cxx override and compiler fallback. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `gpu/vk/eden/shader_recompiler/frontend/ampere/lower_to_maxwell.h:2763`: The changed shader lowering has not yet been exercised on the remaining affected Tier 1 systems. (more on the line) **Do:** Run the Kokiri Forest rendering smoke on AMD RX 6000–9000 on Windows and Linux, Steam Deck, and NVIDIA on Linux; report the hardware, driver and results. `@fix` can do L1. **Checks:** Failing on this head, which is behind its base, where it passes: `CI / Third-party parts and guide screenshots (pull_request)`. `@rebase` (or `@fix`) brings it up to date and runs it again; not held against it. Cancelled on this head (no result): `PR description / Title and description (pull_request_target)`. Still running: 7 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the authored cases: the PR reports RCP -UR4 changing from input c0000000 to 40000000 and negated zero from 00000000 to 80000000. Its regression reportedly fails on base 9b342b46 and passes on eb2bff03 with Clang and GCC; broader game rendering remains to be tested. **Other systems:** The lowering feeds the Maxwell shader translator on all Vulkan devices, so the change can affect NVIDIA, AMD and Steam Deck rendering on Windows and Linux. The reported RTX 4070 Windows smoke ran 240 presents; AMD, Steam Deck and NVIDIA Linux coverage is not reported. **Switches:** None added, changed or removed. **Reviewed:** eb2bff032c69 against 9b342b464c12: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the pull request template, the full diff, both commit messages, the new test, the changed MUFU block, its operand and register-mapping helpers, and the Maxwell MUFU translator. Skimmed the rest of the large lowerer and the test runner; docs/review-checklist.md and ../Tooling/AGENTS.md were absent.; nothing run (a code review). **Checked and fine:** - The Maxwell translator reads the emitted absolute and negate fields at bits 46 and 48. - The trigonometric path applies modifiers before the turns-to-radians multiplication and retains the instruction predicate. - Both commits record AI assistance; no generated files, game-derived files, API versions or switch definitions are changed. **Testing:** No code or tests were run for this review. The PR reports a Windows RTX 4070 game smoke and base-versus-head authored regression runs; the listed head CI checks are still running. **Overlaps and merge order:** Not established from the offline checkout. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as futondestroyer took it out of WIP. Nothing was run; a maintainer decides.</sub>
@ -2759,0 +2760,4 @@
u64 modifiers = 0;
if (uniform) {
const bool absolute = insn.Bits(62, 1);
const bool negate = insn.Bits(63, 1);
Member

L2 (should fix): The changed shader lowering has not yet been exercised on the remaining affected Tier 1 systems.

When: Shaders using these uniform MUFU forms can produce different translated operations on AMD and Linux devices, but the reported game smoke covers only NVIDIA on Windows.

Do: Run the Kokiri Forest rendering smoke on AMD RX 6000–9000 on Windows and Linux, Steam Deck, and NVIDIA on Linux; report the hardware, driver and results.

**L2** (should fix): The changed shader lowering has not yet been exercised on the remaining affected Tier 1 systems. *When:* Shaders using these uniform MUFU forms can produce different translated operations on AMD and Linux devices, but the reported game smoke covers only NVIDIA on Windows. **Do:** Run the Kokiri Forest rendering smoke on AMD RX 6000–9000 on Windows and Linux, Steam Deck, and NVIDIA on Linux; report the hardware, driver and results.
@ -0,0 +101,4 @@
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--cxx", default=shutil.which("clang++") or "g++")
Member

L1 (should fix): The standalone test ignores the CXX environment variable when choosing its compiler.

When: On a machine with both compilers, running the test with CXX=g++ still selects clang++ if it is on PATH, so the requested GCC check actually tests Clang.

Do: Use CXX as the first default when set, while retaining the explicit --cxx override and compiler fallback.

**L1** (should fix): The standalone test ignores the CXX environment variable when choosing its compiler. *When:* On a machine with both compilers, running the test with CXX=g++ still selects clang++ if it is on PATH, so the requested GCC check actually tests Clang. **Do:** Use CXX as the first default when set, while retaining the explicit --cxx override and compiler fallback.
test(shader): honor CXX in the standalone MUFU regression
Some checks are pending
PR description / Title and description (pull_request_target) Successful in 5s
CI / What the change needs (pull_request) Waiting to run
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Waiting to run
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
efdb748ceb
Assisted-by: OpenAI Codex (GPT-6.2 Sol)
Co-Authored-By: OpenAI Codex <[email protected]>
Author
Member

Addressed BeanBot’s compiler selection finding in efdb748c. The standalone fixture honors CXX, with the explicit --cxx override and the original fallback preserved.

Clang and GCC passed on the follow-up and on the clean integration with 55773e36. Both reproduced the lost modifier on that exact main baseline. The isolated compiler-choice check reproduced the former ignored CXX, and Ruff passed. The reviewed shader change is byte-identical to eb2bff03, so the existing Windows RTX 4070 receipt remains pinned to that renderer pack. The remaining Tier 1 runs are listed under Still to test.

Addressed BeanBot’s compiler selection finding in `efdb748c`. The standalone fixture honors `CXX`, with the explicit `--cxx` override and the original fallback preserved. Clang and GCC passed on the follow-up and on the clean integration with `55773e36`. Both reproduced the lost modifier on that exact main baseline. The isolated compiler-choice check reproduced the former ignored `CXX`, and Ruff passed. The reviewed shader change is byte-identical to `eb2bff03`, so the existing Windows RTX 4070 receipt remains pinned to that renderer pack. The remaining Tier 1 runs are listed under Still to test.
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The fixture now honors CXX, and the shader fix preserves the tested uniform-source modifiers. The remaining Tier 1 rendering runs and successful head CI are still needed before merge. Recommend approval; not approved on the forge.

The change preserves absolute value and negation for uniform MUFU sources, including before sine and cosine scaling. It adds a focused regression fixture and keeps the one-word reciprocal lowering for high destination registers.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L2 gpu/vk/eden/shader_recompiler/frontend/ampere/lower_to_maxwell.h:2763: The changed shader lowering has not yet been exercised on the remaining affected Tier 1 systems. When: Shaders using these uniform MUFU forms can produce different translated operations on AMD and Linux devices, but the reported game smoke covers only NVIDIA on Windows. Do: Run the Kokiri Forest rendering smoke on AMD RX 6000–9000 on Windows and Linux, Steam Deck, and NVIDIA on Linux; report the hardware, driver and results.

Since the last review (on eb2bff032c)
Resolved: L1 (The standalone test ignores the CXX environment variable when choosing its compiler.)
Still open: L2 (The changed shader lowering has not yet been exercised on the remaining affected Tier 1 sy…)

Checks: Cancelled on this head (no result): CI / What the change needs (pull_request), CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request), CI / Third-party parts and guide screenshots (pull_request), CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request), CI / Host C for Windows (llvm-mingw, compile only) (pull_request), CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request), CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request), CI / Game-free checks (run_all.py, part 1/2) (pull_request), CI / Game-free checks (run_all.py, part 2/2) (pull_request), CI / Website build and checks (pull_request).

Also noticed (1; not asked for, not blocking)
  • All head CI checks were cancelled without a result, so a successful head run is still needed.
More: does it help, other systems, switches, what was read

Does it help: Yes for the authored cases: the reported regression fails on the base and passes with the fix under Clang and GCC. For RCP -UR4 with UR4 = -2.0, the reported MUFU input changes from c0000000 to 40000000; broader hardware behavior remains to be checked.

Other systems: The lowerer can affect shader output across GPU vendors and operating systems. A Windows RTX 4070 gameplay smoke is reported; AMD Windows and Linux, NVIDIA Linux, and Steam Deck runs remain outstanding.

Switches: None.

Reviewed: efdb748ceb against 9b342b464c: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the full regression fixture, both diffs, and the changed lowering and its materialization and register-mapping context. Skimmed standards and the test runner's compiler selection. The full lowerer was not read; the adjacent Tooling AGENTS.md was unavailable.; nothing run (a code review).

Checked and fine:

  • The compiler-selection follow-up leaves the shader lowering unchanged.
  • The fixture covers signed zero, predication, modifier combinations, and a high reciprocal destination.

Testing: No commands or tests from the project were run. The reported Windows gameplay smoke and compiler runs were considered as evidence; the remaining Tier 1 runs are listed in the pull request.

Overlaps and merge order: Not checked; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by futondestroyer. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The fixture now honors CXX, and the shader fix preserves the tested uniform-source modifiers. The remaining Tier 1 rendering runs and successful head CI are still needed before merge. Recommend approval; not approved on the forge. The change preserves absolute value and negation for uniform MUFU sources, including before sine and cosine scaling. It adds a focused regression fixture and keeps the one-word reciprocal lowering for high destination registers. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `gpu/vk/eden/shader_recompiler/frontend/ampere/lower_to_maxwell.h:2763`: The changed shader lowering has not yet been exercised on the remaining affected Tier 1 systems. *When:* Shaders using these uniform MUFU forms can produce different translated operations on AMD and Linux devices, but the reported game smoke covers only NVIDIA on Windows. **Do:** Run the Kokiri Forest rendering smoke on AMD RX 6000–9000 on Windows and Linux, Steam Deck, and NVIDIA on Linux; report the hardware, driver and results. **Since the last review** (on eb2bff032c69) Resolved: L1 (The standalone test ignores the CXX environment variable when choosing its compiler.) Still open: L2 (The changed shader lowering has not yet been exercised on the remaining affected Tier 1 sy…) **Checks:** Cancelled on this head (no result): `CI / What the change needs (pull_request)`, `CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request)`, `CI / Third-party parts and guide screenshots (pull_request)`, `CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request)`, `CI / Host C for Windows (llvm-mingw, compile only) (pull_request)`, `CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request)`, `CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request)`, `CI / Game-free checks (run_all.py, part 1/2) (pull_request)`, `CI / Game-free checks (run_all.py, part 2/2) (pull_request)`, `CI / Website build and checks (pull_request)`. <details> <summary>Also noticed (1; not asked for, not blocking)</summary> - All head CI checks were cancelled without a result, so a successful head run is still needed. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the authored cases: the reported regression fails on the base and passes with the fix under Clang and GCC. For RCP -UR4 with UR4 = -2.0, the reported MUFU input changes from c0000000 to 40000000; broader hardware behavior remains to be checked. **Other systems:** The lowerer can affect shader output across GPU vendors and operating systems. A Windows RTX 4070 gameplay smoke is reported; AMD Windows and Linux, NVIDIA Linux, and Steam Deck runs remain outstanding. **Switches:** None. **Reviewed:** efdb748ceba1 against 9b342b464c12: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the full regression fixture, both diffs, and the changed lowering and its materialization and register-mapping context. Skimmed standards and the test runner's compiler selection. The full lowerer was not read; the adjacent Tooling AGENTS.md was unavailable.; nothing run (a code review). **Checked and fine:** - The compiler-selection follow-up leaves the shader lowering unchanged. - The fixture covers signed zero, predication, modifier combinations, and a high reciprocal destination. **Testing:** No commands or tests from the project were run. The reported Windows gameplay smoke and compiler runs were considered as evidence; the remaining Tier 1 runs are listed in the pull request. **Overlaps and merge order:** Not checked; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by futondestroyer. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch codex/mufu-uniform-modifiers-wip 2026-12-05 18:56:44 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2865
No description provided.