fix(shader): flush the v_mad_legacy_f32 and v_mac_legacy_f32 product by its tininess after rounding #26098

Merged
DannyOppenheimer merged 2 commits from upstream-pr/26098 into main 2026-11-27 18:42:32 +00:00
DannyOppenheimer commented 2026-11-23 08:36:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DannyOppenheimer on 2026-11-23T08:36:51Z.


What

v_mad_legacy_f32 and v_mac_legacy_f32 flush a product below 2^-126 to a zero of its sign in every f32 denormal mode. The translation decided that from the exact product (flushTinyProduct(..., afterRounding = false)), but on RDNA1 the hardware decides it after rounding the product to 24 bits with an unbounded exponent: a product just below 2^-126 that rounds up to it is kept. So a * b + c with such a product lost the 2^-126 term, for example 0xbbc6f27d * 0x8424b4fe + -0 gives 0x00800000 on the hardware and +0 before this change.

  • vFmaLegacyF32 calls flushTinyProduct with its default, after-rounding test, the one v_mul_f32 uses.
  • The debt entry of the legacy forms records when the product is flushed.
  • F32DenormalFlush and the vector_constant_factor_tininess fixture still expected the exact-product check. TinyLegacyExpected is now one row per f32 round mode, measured on gfx1010, and the fixture expects the rounded check for v_mad_legacy_f32 and v_mac_legacy_f32. Round mode 2 is not checked for the legacy forms here: the hardware gives -0 for a +0 + -0 sum there, which is the directed rounding #26100 adds.
  • The [f32 denormals] debt entry said the legacy product is checked on its exact value; the fragment fixes that sentence and removes the entry's stale duplicate on main.

Found while measuring the legacy forms for the directed round modes (a follow-up PR that depends on this one).

Tested

Windows 11, Radeon RX 5700 XT (gfx1010), AMD driver 32.0.21045.5002.

  • Over 1500 products placed within 2^-20 of 2^-126 (both signs, random significands), the hardware result of v_mad_legacy_f32 a, b, 0 matches "flush when the product rounded to 24 bits with an unbounded exponent is below 2^-126" in all four round modes (0 mismatches); "flush when the exact product is below 2^-126" misses 99 to 116 rows per round to nearest and directed mode, and "flush when the product rounded into the denormal range is denormal" 41 to 87.
  • agc_oracle_runner with this change equals the hardware on 45504 rows of both instructions at round to nearest (2400 random rows, the 144 edge combinations and 300 boundary products, in the four f32 denormal modes at IEEE 0 and 1); main differs on 21 to 22 rows per configuration, all of them boundary products.
  • New agc_driver_legacy_product_tininess: 32 rows (16 products that round up to 2^-126 and are kept, 8 that stay below it and are flushed, ordinary rows) through both instructions, run with FLOAT_MODE 0xc0, 0xd0, 0xe0 and 0xf0 at IEEE 0 and 1 (8 of 8 runs pass). The existing agc_driver_fma_legacy, agc_driver_mac_legacy and agc_driver_vop3_legacy_source_modifiers still pass.
  • Validation: ctest --test-dir build -R "agc_driver_.*(directed_rounding|legacy|div_fmas|division|f64_fma|f64_ldexp|ldexp_f32|vop3_cube|nan_quieting|f64_arithmetic|f32_output_modifier|cubema)|agc_shader_mode_register" -V with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, Khronos validation layer 1.4.369, main at 28f493e6d1 and this branch at 4f64d47e46, each run after its test targets were relinked: main 21 of 21 passed, this branch 22 of 22 passed (with the new agc_driver_legacy_product_tininess). Insert instance layer "VK_LAYER_KHRONOS_validation" appears 20 and 21 times, once per GPU test (agc_shader_mode_register creates no Vulkan instance); was not found but was requested appears 0 and 0 times, and VUID- 0 and 0 times.
  • After the review: the 32 F32DenormalFlush legacy rows through both instructions on gfx1010 at IEEE 0 and 1, f32 denormals flushed and kept, in each round mode, give the new TinyLegacyExpected. ctest --test-dir build -R "agc_driver_(legacy_product_tininess|f32_denormal_flush|fma_legacy|mac_legacy|vop3_legacy_source_modifiers|f32_add_mul_denormal_modes)$|^vector_constant_factor_tininess$" -V with the same environment and layer: main at 6555c1425a 6 of 6 passed, this branch at d92354fed8 7 of 7; Insert instance layer 5 and 6 times, was not found but was requested 0 and 0, VUID- 0 and 0.
  • tools/check_conventions.py --base origin/main passes with one debt-length warning (the changed debt entry was already long) and tools/debt_fold.py --check passes.

tools/pr_overlap.py --branch finds no conflicting lines in open PRs. #20187 could not be compared automatically; its FloatInstructions.cpp hunk is in floatBinary, away from vFmaLegacyF32.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 5700 XT (gfx1010, RDNA1), AMD Windows driver 32.0.21045.5002, Windows 11 Home 10.0.26200
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5449804196 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26098). Originally posted by [DannyOppenheimer](https://github.com/DannyOppenheimer) on 2026-11-23T08:36:51Z. --- ### What `v_mad_legacy_f32` and `v_mac_legacy_f32` flush a product below 2^-126 to a zero of its sign in every f32 denormal mode. The translation decided that from the exact product (`flushTinyProduct(..., afterRounding = false)`), but on RDNA1 the hardware decides it after rounding the product to 24 bits with an unbounded exponent: a product just below 2^-126 that rounds up to it is kept. So `a * b + c` with such a product lost the 2^-126 term, for example `0xbbc6f27d * 0x8424b4fe + -0` gives `0x00800000` on the hardware and +0 before this change. - `vFmaLegacyF32` calls `flushTinyProduct` with its default, after-rounding test, the one `v_mul_f32` uses. - The debt entry of the legacy forms records when the product is flushed. - `F32DenormalFlush` and the `vector_constant_factor_tininess` fixture still expected the exact-product check. `TinyLegacyExpected` is now one row per f32 round mode, measured on gfx1010, and the fixture expects the rounded check for `v_mad_legacy_f32` and `v_mac_legacy_f32`. Round mode 2 is not checked for the legacy forms here: the hardware gives -0 for a +0 + -0 sum there, which is the directed rounding #26100 adds. - The `[f32 denormals]` debt entry said the legacy product is checked on its exact value; the fragment fixes that sentence and removes the entry's stale duplicate on `main`. Found while measuring the legacy forms for the directed round modes (a follow-up PR that depends on this one). ### Tested Windows 11, Radeon RX 5700 XT (gfx1010), AMD driver 32.0.21045.5002. - Over 1500 products placed within 2^-20 of 2^-126 (both signs, random significands), the hardware result of `v_mad_legacy_f32 a, b, 0` matches "flush when the product rounded to 24 bits with an unbounded exponent is below 2^-126" in all four round modes (0 mismatches); "flush when the exact product is below 2^-126" misses 99 to 116 rows per round to nearest and directed mode, and "flush when the product rounded into the denormal range is denormal" 41 to 87. - `agc_oracle_runner` with this change equals the hardware on 45504 rows of both instructions at round to nearest (2400 random rows, the 144 edge combinations and 300 boundary products, in the four f32 denormal modes at IEEE 0 and 1); `main` differs on 21 to 22 rows per configuration, all of them boundary products. - New `agc_driver_legacy_product_tininess`: 32 rows (16 products that round up to 2^-126 and are kept, 8 that stay below it and are flushed, ordinary rows) through both instructions, run with FLOAT_MODE 0xc0, 0xd0, 0xe0 and 0xf0 at IEEE 0 and 1 (8 of 8 runs pass). The existing `agc_driver_fma_legacy`, `agc_driver_mac_legacy` and `agc_driver_vop3_legacy_source_modifiers` still pass. - Validation: `ctest --test-dir build -R "agc_driver_.*(directed_rounding|legacy|div_fmas|division|f64_fma|f64_ldexp|ldexp_f32|vop3_cube|nan_quieting|f64_arithmetic|f32_output_modifier|cubema)|agc_shader_mode_register" -V` with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer`, Khronos validation layer 1.4.369, `main` at 28f493e6d1 and this branch at 4f64d47e46, each run after its test targets were relinked: `main` 21 of 21 passed, this branch 22 of 22 passed (with the new `agc_driver_legacy_product_tininess`). `Insert instance layer "VK_LAYER_KHRONOS_validation"` appears 20 and 21 times, once per GPU test (`agc_shader_mode_register` creates no Vulkan instance); `was not found but was requested` appears 0 and 0 times, and `VUID-` 0 and 0 times. - After the review: the 32 `F32DenormalFlush` legacy rows through both instructions on gfx1010 at IEEE 0 and 1, f32 denormals flushed and kept, in each round mode, give the new `TinyLegacyExpected`. `ctest --test-dir build -R "agc_driver_(legacy_product_tininess|f32_denormal_flush|fma_legacy|mac_legacy|vop3_legacy_source_modifiers|f32_add_mul_denormal_modes)$|^vector_constant_factor_tininess$" -V` with the same environment and layer: `main` at 6555c1425a 6 of 6 passed, this branch at d92354fed8 7 of 7; `Insert instance layer` 5 and 6 times, `was not found but was requested` 0 and 0, `VUID-` 0 and 0. - `tools/check_conventions.py --base origin/main` passes with one `debt-length` warning (the changed debt entry was already long) and `tools/debt_fold.py --check` passes. `tools/pr_overlap.py --branch` finds no conflicting lines in open PRs. #20187 could not be compared automatically; its `FloatInstructions.cpp` hunk is in `floatBinary`, away from `vFmaLegacyF32`. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 5700 XT (gfx1010, RDNA1), AMD Windows driver 32.0.21045.5002, Windows 11 Home 10.0.26200 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-23 09:10:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T09:10:54Z.

Review: COMMENTED


Reviewed — no blocking findings

The changed translation uses the after-rounding tininess check described in the PR, and the added test covers both legacy instructions across the listed float modes.

What I ran

Reviewed head 4f64d47e46a7c077412c8ecd2b7c7f8518ae458c using the prepared diff and repo_read.py source reads. No commands or tests were run.

Results

Check Result Note
Changed code review passed All changed lines read
Automated checks not run Author-reported results only
Negative control not run No negative control was run

Findings

Blocking

None.

Non-blocking

None.

Sources

The changed call now relies on flushTinyProduct's default after-rounding behavior: FloatInstructions.cpp at reviewed head. The helper applies its after-rounding path when requested: OperandAccess.cpp at reviewed head.

Not verified

Automated checks were not run in this review; the reported hardware and CI results in the PR description were not independently verified. Files read: core/libs/prx/libSceAgcDriver/tests/execution/LegacyProductTininess.cpp, core/shader/recompiler/Translation/src/FloatInstructions.cpp, docs/dev/debt/changes/legacy-product-tininess.md, and core/shader/recompiler/Translation/src/TranslationContext/OperandAccess.cpp. No changed files were excluded.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6018984895 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26098#pullrequestreview-6018984895). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-23T09:10:54Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The changed translation uses the after-rounding tininess check described in the PR, and the added test covers both legacy instructions across the listed float modes. ## What I ran Reviewed head `4f64d47e46a7c077412c8ecd2b7c7f8518ae458c` using the prepared diff and `repo_read.py` source reads. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | All changed lines read | | Automated checks | not run | Author-reported results only | | Negative control | not run | No negative control was run | ## Findings ### Blocking None. ### Non-blocking None. ## Sources The changed call now relies on `flushTinyProduct`'s default after-rounding behavior: [FloatInstructions.cpp at reviewed head](https://github.com/boykopovar/AnyPS5/blob/4f64d47e46a7c077412c8ecd2b7c7f8518ae458c/core/shader/recompiler/Translation/src/FloatInstructions.cpp#L837-L850). The helper applies its after-rounding path when requested: [OperandAccess.cpp at reviewed head](https://github.com/boykopovar/AnyPS5/blob/4f64d47e46a7c077412c8ecd2b7c7f8518ae458c/core/shader/recompiler/Translation/src/TranslationContext/OperandAccess.cpp#L161-L190). ## Not verified Automated checks were not run in this review; the reported hardware and CI results in the PR description were not independently verified. Files read: `core/libs/prx/libSceAgcDriver/tests/execution/LegacyProductTininess.cpp`, `core/shader/recompiler/Translation/src/FloatInstructions.cpp`, `docs/dev/debt/changes/legacy-product-tininess.md`, and `core/shader/recompiler/Translation/src/TranslationContext/OperandAccess.cpp`. No changed files were excluded. ## To get this to a good state Nothing is required.
mihiii1337 commented 2026-11-23 09:36:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mihiii1337 on 2026-11-23T09:36:17Z.

Review: CHANGES_REQUESTED


The production change matches the intended after-rounding legacy-product model, but the exact hosted Windows run is red because the existing vector_constant_factor_tininess fixture still expects the old Tininess::Full IR shape for v_mad_legacy_f32. Please update that expectation to Tininess::Rounded; adding the v_mac_legacy_f32 sibling would keep this structural regression check aligned with the two instructions covered by the new execution test.

The exact Windows job passed 226 of 227 tests and failed only this fixture: it found zero full-exponent tiny-product checks where the stale expectation requires one.

I independently extracted the relevant translation decision into a CPU A/B harness. The head matched an integer oracle in 512 packed fixture assertions, 4,096 boundary cases, and 2,662 signed-zero/NaN/Inf/DAZ cases. The parent differed in 240 fixture assertions and 156 boundary cases, as expected. An instrumented legacy-MAD control changed from exponent/rounded/UMulHi counts 1/0/1 on the parent to 0/1/0 on this head, confirming that the failing hosted test is stale rather than exposing a production regression. Legacy DAZ/FTZ remains forced independently of MODE bits.

No GPU or shader execution was performed in this review. The separately reported real-GPU evidence is complementary, not part of my verification.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6019290381 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26098#pullrequestreview-6019290381). Originally posted by [mihiii1337](https://github.com/mihiii1337) on 2026-11-23T09:36:17Z. **Review:** CHANGES_REQUESTED --- The production change matches the intended after-rounding legacy-product model, but the exact hosted Windows run is red because the existing `vector_constant_factor_tininess` fixture still expects the old `Tininess::Full` IR shape for `v_mad_legacy_f32`. Please update that expectation to `Tininess::Rounded`; adding the `v_mac_legacy_f32` sibling would keep this structural regression check aligned with the two instructions covered by the new execution test. The [exact Windows job](https://github.com/boykopovar/AnyPS5/actions/runs/45140044097/job/137577569615) passed 226 of 227 tests and failed only this fixture: it found zero full-exponent tiny-product checks where the stale expectation requires one. I independently extracted the relevant translation decision into a CPU A/B harness. The head matched an integer oracle in 512 packed fixture assertions, 4,096 boundary cases, and 2,662 signed-zero/NaN/Inf/DAZ cases. The parent differed in 240 fixture assertions and 156 boundary cases, as expected. An instrumented legacy-MAD control changed from exponent/rounded/UMulHi counts `1/0/1` on the parent to `0/1/0` on this head, confirming that the failing hosted test is stale rather than exposing a production regression. Legacy DAZ/FTZ remains forced independently of MODE bits. No GPU or shader execution was performed in this review. The separately reported real-GPU evidence is complementary, not part of my verification. AI-assisted: yes.
Superseabas commented 2026-11-23 11:36:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Superseabas on 2026-11-23T11:36:39Z.

Review: COMMENTED


Windows check of head 4f64d47e46 with GCC 16 on an NVIDIA and an AMD GPU, merged onto main f5b7e1d1ac (clean merge). The reports so far are AMD (gfx1010, gfx1201, RADV) and the hosted Windows job, so this adds NVIDIA. It confirms the two stale expectations already raised, on both vendors.

Setup: Windows 11 Home 10.0.26200, WinLibs GCC 16.2.0 (x86_64-ucrt-posix-seh, r3), Release full build, run from PowerShell with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. GPUs, each picked with ANYPS5_GPU: NVIDIA GeForce RTX 5070 Ti (621.01) and the Ryzen 7 7700X's integrated AMD Radeon (1002:164e, Adrenalin 26.10.2). This was built together with #25557, #24781 and #22251, which touch other files.

  • ^(agc_driver_.*legacy.*|agc_driver_f32_denormal_flush|.*tininess.*)$: main 6 of 6. With this PR, 5 of 7 in 2 of 2 runs, on both GPUs. No VUID- lines.
    • The new agc_driver_legacy_product_tininess passes, as do agc_driver_fma_legacy, agc_driver_mac_legacy and agc_driver_vop3_legacy_source_modifiers.
    • agc_driver_f32_denormal_flush fails on the RTX as well as the Radeon, at the same first lane Helldiverr gives: lane 0 no float mode v_mad_legacy_f32 v18, v4, v5, v6 is 0x00800000, expected 0x00000000.
    • vector_constant_factor_tininess fails with f32 constant factor: v_mad_legacy_f32 v5, v6, v7, v8 emits 0 exponent tiny product checks, expected 1, the stale Tininess::Full shape mihiii1337 pointed to.
  • Red check: with vFmaLegacyF32 back to flushTinyProduct(..., nullptr, false), the new agc_driver_legacy_product_tininess fails with v_mad_legacy_f32 FLOAT_MODE 0xc0, IEEE=0 of 0xbb57f116, 0x497bea0, 0x80800000 is 0x80800000, expected 0x81000000. So the new test guards the change.

So the production change behaves the same on NVIDIA. What's left is updating TinyLegacyExpected in F32DenormalFlush.cpp and the constant-factor fixture to the after-rounding rule.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6020989009 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26098#pullrequestreview-6020989009). Originally posted by [Superseabas](https://github.com/Superseabas) on 2026-11-23T11:36:39Z. **Review:** COMMENTED --- Windows check of head `4f64d47e46` with GCC 16 on an NVIDIA and an AMD GPU, merged onto `main` `f5b7e1d1ac` (clean merge). The reports so far are AMD (gfx1010, gfx1201, RADV) and the hosted Windows job, so this adds NVIDIA. It confirms the two stale expectations already raised, on both vendors. **Setup:** Windows 11 Home 10.0.26200, WinLibs GCC 16.2.0 (`x86_64-ucrt-posix-seh`, r3), Release full build, run from PowerShell with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`. GPUs, each picked with `ANYPS5_GPU`: NVIDIA GeForce RTX 5070 Ti (621.01) and the Ryzen 7 7700X's integrated AMD Radeon (`1002:164e`, Adrenalin 26.10.2). This was built together with #25557, #24781 and #22251, which touch other files. - `^(agc_driver_.*legacy.*|agc_driver_f32_denormal_flush|.*tininess.*)$`: `main` 6 of 6. With this PR, 5 of 7 in 2 of 2 runs, on both GPUs. No `VUID-` lines. - The new `agc_driver_legacy_product_tininess` passes, as do `agc_driver_fma_legacy`, `agc_driver_mac_legacy` and `agc_driver_vop3_legacy_source_modifiers`. - `agc_driver_f32_denormal_flush` fails on the RTX as well as the Radeon, at the same first lane Helldiverr gives: `lane 0 no float mode v_mad_legacy_f32 v18, v4, v5, v6 is 0x00800000, expected 0x00000000`. - `vector_constant_factor_tininess` fails with `f32 constant factor: v_mad_legacy_f32 v5, v6, v7, v8 emits 0 exponent tiny product checks, expected 1`, the stale `Tininess::Full` shape mihiii1337 pointed to. - **Red check:** with `vFmaLegacyF32` back to `flushTinyProduct(..., nullptr, false)`, the new `agc_driver_legacy_product_tininess` fails with `v_mad_legacy_f32 FLOAT_MODE 0xc0, IEEE=0 of 0xbb57f116, 0x497bea0, 0x80800000 is 0x80800000, expected 0x81000000`. So the new test guards the change. So the production change behaves the same on NVIDIA. What's left is updating `TinyLegacyExpected` in `F32DenormalFlush.cpp` and the constant-factor fixture to the after-rounding rule. AI-assisted: yes (Claude Code)
mihiii1337 commented 2026-11-24 13:22:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mihiii1337 on 2026-11-24T13:22:59Z.

Review: APPROVED


Rechecked exact head d92354fed81e0bbe8cb4a405d615ecf2a7d7fb1e. The structural-test blocker from my previous review is fixed.

vector_constant_factor_tininess now expects Tininess::Rounded for both legacy MAD and MAC while retaining the directed Tininess::Full control. The exact Hosted Windows job passes that test and the full selected set, 227/227. Contributor-reported focused runs also cover legacy_product_tininess and f32_denormal_flush on multiple AMD generations and RTX 3070; reverting the product rule makes the targeted tests fail.

The intentionally absent round-down signed-zero row remains scoped to the separate additive work described in #26100 and does not reopen this PR's after-rounding product fix. I did not run a GPU test on my machine for this review.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6039946922 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26098#pullrequestreview-6039946922). Originally posted by [mihiii1337](https://github.com/mihiii1337) on 2026-11-24T13:22:59Z. **Review:** APPROVED --- Rechecked exact head `d92354fed81e0bbe8cb4a405d615ecf2a7d7fb1e`. The structural-test blocker from my previous review is fixed. `vector_constant_factor_tininess` now expects `Tininess::Rounded` for both legacy MAD and MAC while retaining the directed `Tininess::Full` control. The exact Hosted Windows job passes that test and the full selected set, 227/227. Contributor-reported focused runs also cover `legacy_product_tininess` and `f32_denormal_flush` on multiple AMD generations and RTX 3070; reverting the product rule makes the targeted tests fail. The intentionally absent round-down signed-zero row remains scoped to the separate additive work described in #26100 and does not reopen this PR's after-rounding product fix. I did not run a GPU test on my machine for this review. AI-assisted: yes.
Superseabas commented 2026-11-24 17:09:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Superseabas on 2026-11-24T17:09:07Z.

Review: APPROVED


Re-review on Windows of head d92354fed8, on the same two GPUs as my earlier comment, where both stale expectations failed on NVIDIA as well as AMD.

Setup: Windows 11 Home 10.0.26200, WinLibs GCC 16.2.0 (x86_64-ucrt-posix-seh, r3), Release full build, run from PowerShell with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. GPUs, each picked with ANYPS5_GPU: NVIDIA GeForce RTX 5070 Ti (621.01) and the Ryzen 7 7700X's integrated AMD Radeon (1002:164e, Adrenalin 26.10.2). Merged onto main 45fc4e23bb (clean merge), built together with #26096 and #19532, which touch other files.

  • agc_driver_f32_denormal_flush, vector_constant_factor_tininess, agc_driver_legacy_product_tininess, agc_driver_fma_legacy, agc_driver_mac_legacy and agc_driver_vop3_legacy_source_modifiers: main 6 of 6, and with this PR 7 of 7 in 2 of 2 runs, on both GPUs. The two that failed on 4f64d47e46 now pass. No VUID- lines.
  • Red check: with vFmaLegacyF32 back to the exact-product rule, three tests fail on the RTX: agc_driver_f32_denormal_flush (lane 0 no float mode v_mad_legacy_f32 ... is 0x00000000, expected 0x00800000), agc_driver_legacy_product_tininess and vector_constant_factor_tininess. So the updated expectations now pin the new rule.

The translation is unchanged from 4f64d47e46. Only TinyLegacyExpected and the constant-factor fixture moved to the after-rounding rule, which is what my comment asked for.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6043888477 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26098#pullrequestreview-6043888477). Originally posted by [Superseabas](https://github.com/Superseabas) on 2026-11-24T17:09:07Z. **Review:** APPROVED --- Re-review on Windows of head `d92354fed8`, on the same two GPUs as my earlier comment, where both stale expectations failed on NVIDIA as well as AMD. **Setup:** Windows 11 Home 10.0.26200, WinLibs GCC 16.2.0 (`x86_64-ucrt-posix-seh`, r3), Release full build, run from PowerShell with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`. GPUs, each picked with `ANYPS5_GPU`: NVIDIA GeForce RTX 5070 Ti (621.01) and the Ryzen 7 7700X's integrated AMD Radeon (`1002:164e`, Adrenalin 26.10.2). Merged onto `main` `45fc4e23bb` (clean merge), built together with #26096 and #19532, which touch other files. - `agc_driver_f32_denormal_flush`, `vector_constant_factor_tininess`, `agc_driver_legacy_product_tininess`, `agc_driver_fma_legacy`, `agc_driver_mac_legacy` and `agc_driver_vop3_legacy_source_modifiers`: `main` 6 of 6, and with this PR 7 of 7 in 2 of 2 runs, on both GPUs. The two that failed on `4f64d47e46` now pass. No `VUID-` lines. - **Red check:** with `vFmaLegacyF32` back to the exact-product rule, three tests fail on the RTX: `agc_driver_f32_denormal_flush` (`lane 0 no float mode v_mad_legacy_f32 ... is 0x00000000, expected 0x00800000`), `agc_driver_legacy_product_tininess` and `vector_constant_factor_tininess`. So the updated expectations now pin the new rule. The translation is unchanged from `4f64d47e46`. Only `TinyLegacyExpected` and the constant-factor fixture moved to the after-rounding rule, which is what my comment asked for. AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-11-24 23:34:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-24T23:34:02Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change; the points below are optional.

What I ran

Reviewed head d92354fed81e0bbe8cb4a405d615ecf2a7d7fb1e against the supplied diff. I inspected the listed changed lines and the tininess helper they use. No commands or tests were run in this review.

Results

Check Result Note
Changed code review passed Changed logic and fixtures inspected
Tests not run Author-reported results only
Test registration not verified Search did not locate the new test registration

Findings

Blocking

None.

Non-blocking

  • The new GPU test’s registration was not confirmed in the searched test configuration. Verify the test is included in the build and CI suite.

Sources

Not verified

  • No tests were run here; the reported hardware and CTest results are from the PR description.
  • Test registration for LegacyProductTininess.cpp was not verified.
  • The five changed files listed as reviewed in manifest.json were read; no changed files were excluded.

To get this to a good state

Nothing is required. Optional: confirm LegacyProductTininess.cpp is registered in the test build and CI configuration.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6049120079 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26098#pullrequestreview-6049120079). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-24T23:34:02Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change; the points below are optional. ## What I ran Reviewed head `d92354fed81e0bbe8cb4a405d615ecf2a7d7fb1e` against the supplied diff. I inspected the listed changed lines and the tininess helper they use. No commands or tests were run in this review. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | Changed logic and fixtures inspected | | Tests | not run | Author-reported results only | | Test registration | not verified | Search did not locate the new test registration | ## Findings ### Blocking None. ### Non-blocking - The new GPU test’s registration was not confirmed in the searched test configuration. Verify the test is included in the build and CI suite. ## Sources - [FloatInstructions.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/d92354fed81e0bbe8cb4a405d615ecf2a7d7fb1e/core/shader/recompiler/Translation/src/FloatInstructions.cpp#L837-L851) - [OperandAccess.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/d92354fed81e0bbe8cb4a405d615ecf2a7d7fb1e/core/shader/recompiler/Translation/src/TranslationContext/OperandAccess.cpp#L161-L202) ## Not verified - No tests were run here; the reported hardware and CTest results are from the PR description. - Test registration for `LegacyProductTininess.cpp` was not verified. - The five changed files listed as reviewed in `manifest.json` were read; no changed files were excluded. ## To get this to a good state Nothing is required. Optional: confirm `LegacyProductTininess.cpp` is registered in the test build and CI configuration.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!26098
No description provided.