fix(shader): flush v_ldexp_f64 denormals by the f64 denormal field #13842

Merged
Deftera186 merged 2 commits from upstream-pr/13842 into main 2026-11-01 04:30:23 +00:00
Deftera186 commented 2026-10-31 09:03:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Deftera186 on 2026-10-31T09:03:52Z.


What

TranslationContext::float64Unary flushed the input of v_floor/ceil/fract/frexp_mant_f64 and the result of v_fract_f64 by the FLOAT_MODE f16/f64 denormal field (bits 7:6), but v_ldexp_f64 was translated straight through FPLdexp64 and never read that field. A shader in a denormal-flushing mode got the wrong result whenever the scale produced or consumed a subnormal: with f64 denormals flushed, v_ldexp_f64 0x0000000000000001, 54 (the minimum denormal scaled up by 2^54) returned 0x0030000000000000 instead of the hardware's +0, because the denormal input was not flushed first; and v_ldexp_f64 0x3ff0000000000000, -1023 (1.0 scaled to 2^-1023) returned the denormal 0x0008000000000000 instead of +0.

float64Unary now flushes the v_ldexp_f64 input with the existing flushF64Bits(bits, 0x40u) helper when bit 0 of the field is clear, and flushes a tiny result to a zero of the input's sign when bit 1 is clear. Tininess is tested before rounding, as the hardware does: the result is tiny when the input is finite and nonzero and its true exponent plus the scale n is below -1022. The input's true exponent is exp - 1023 for a normal and msb(mantissa) - 1074 for a kept denormal; n is clamped to [-2200, 2200] first, which cannot change the comparison because the f64 exponent range is narrower and so leaves the sign of exponent + n + 1022 unchanged. The exact-value test keeps the tie right: 0x3fffffffffffffff * 2^-1023 is below 2^-1022 and flushes to +0 in modes 0 and 1 even though it would round up to 0x0010000000000000, which is what modes 2 and 3 return. Signaling-NaN quieting is unchanged (IEEE=1 quiets, IEEE=0 keeps), computed from the NaN bits. Only v_ldexp_f64 is touched; the other float64Unary opcodes and the decoder's operand support are unchanged, and a shader without a known float mode keeps the previous lowering (mode-3 results).

Sources:

  • AMD "RDNA2 Instruction Set Architecture" (v_ldexp_f64 scales src0 by the integer src1); the f16/f64 denormal field of FLOAT_MODE controls f64 denormals, per the LLVM AMDGPU kernel descriptor documentation.
  • Hardware measurements on gfx1101 with tools/hw-oracle, below.

Tested

Measured on RDNA3 (gfx1101, Radeon RX 7700 XT) with tools/hw-oracle; not measured on the PS5's gfx1013 or on RDNA2. All tables are at DX10_CLAMP=1, round to nearest even; both IEEE settings give the same non-NaN results.

  • New execution test F64LdexpDenormalModes.cpp (ctest agc_driver_f64_ldexp_denormal_modes): 20 f64 inputs (signed zeros, denormals, the minimum normal and one above it, 1.0, 1.5, the tininess tie 0x3fffffffffffffff, 2.0, the largest finite value, infinities and quiet and signaling NaNs) run through two forms, v_ldexp_f64 with a VGPR exponent and with the inline constant -1, in the nine modes of the f64 add/mul test (the four denormal fields at IEEE 0 and 1, and a shader without a known float mode). Expected values are the gfx1101 results.
  • Red: with the fix reverted to origin/main and the test present, it fails at AGC graphics: v_ldexp_f64 by v6 f64 denormal mode 0, IEEE mode on of 0x0000000000000001 is 0x0030000000000000, expected 0x0000000000000000 (the test throws on the first wrong result). After restoring the fix it passes: f64 ldexp denormal mode tests passed, 0 device-dependent results skipped.
  • Hardware model: a sweep of the fixed recompiler against the oracle over 658 rows per mode (src0 edge and boundary values scaled by exponents around the denormal boundary) in all eight IEEE x field combinations gives 0 mismatches; probe-main (unfixed) gives 100/45/68/0 in fields 0/1/2/3 at each IEEE setting, 426 total. A further 4096 random rows give 0 mismatches for the fix and 122 for main.
  • Paired validation-layer runs (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer) over agc_driver_f64_ldexp_denormal_modes, agc_driver_nan_quieting (runs v_ldexp_f64), agc_driver_f64_add_mul_denormal_modes, agc_driver_f64_rounding_denormal_modes and agc_driver_div_fixup_f64_denormal_modes. State A (fix reverted, test present): the layer is inserted 5 times, no missing-layer line, 0 VUID messages, and only the new test fails (4 of 5 pass). State B (fix): the layer is inserted 5 times, no missing-layer line, 0 VUID messages, 5 of 5 pass. B's VUID count does not exceed A's.
  • lavapipe: agc_driver_f64_ldexp_denormal_modes passes on llvmpipe (LLVM 20.1.2), Mesa 25.2.8, in an Ubuntu 24.04 container with the Linux CI configuration, in 0.52 s, 0 device-dependent results skipped.

Hardware results on gfx1101 (FLOAT_MODE field, IEEE=0, DX10_CLAMP=1, round to nearest even). The recompiler result on origin/main is in parentheses where it differed; with the fix every result matches.

src0 n field 0 field 1 field 2 field 3
0x0000000000000001 54 0x0000000000000000 (0x0030000000000000) 0x0030000000000000 0x0000000000000000 (0x0030000000000000) 0x0030000000000000
0x000fffffffffffff 1 0x0000000000000000 (0x001ffffffffffffe) 0x001ffffffffffffe 0x0000000000000000 (0x001ffffffffffffe) 0x001ffffffffffffe
0x0010000000000000 -1 0x0000000000000000 (0x0008000000000000) 0x0000000000000000 (0x0008000000000000) 0x0008000000000000 0x0008000000000000
0x3ff0000000000000 -1023 0x0000000000000000 (0x0008000000000000) 0x0000000000000000 (0x0008000000000000) 0x0008000000000000 0x0008000000000000
0x3fffffffffffffff -1023 0x0000000000000000 (0x0010000000000000) 0x0000000000000000 (0x0010000000000000) 0x0010000000000000 0x0010000000000000
0x4000000000000000 -1022 0x0020000000000000 0x0020000000000000 0x0020000000000000 0x0020000000000000
0x7fefffffffffffff 0 0x7fefffffffffffff 0x7fefffffffffffff 0x7fefffffffffffff 0x7fefffffffffffff

Fields 0 and 2 clear bit 0, so the denormal src0 0x000fffffffffffff and 0x0000000000000001 are flushed to +0 before scaling; fields 0 and 1 clear bit 1, so the tiny results of rows 3-5 flush to +0. The tie row 0x3fffffffffffffff scaled by 2^-1023 is below 2^-1022 and flushes in fields 0 and 1, while fields 2 and 3 return the rounded 0x0010000000000000. A signaling NaN src0 (0x7ff0000000000001) is returned unchanged with IEEE=0 and quieted to 0x7ff8000000000001 with IEEE=1, unchanged by the denormal field.

GPUs tested: AMD Radeon RX 7700 XT (gfx1101), RADV, Mesa 26.2.4, Gentoo Linux (kernel 7.2.11); llvmpipe (LLVM 20.1.2), Mesa 25.2.8, Ubuntu 24.04 container with the Linux CI configuration.

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
  • 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 7700 XT (gfx1101), RADV, Mesa 26.2.4, Gentoo Linux; llvmpipe (LLVM 20.1.2), Mesa 25.2.8, Ubuntu 24.04 CI container
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5096159858 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13842). Originally posted by [Deftera186](https://github.com/Deftera186) on 2026-10-31T09:03:52Z. --- ### What `TranslationContext::float64Unary` flushed the input of `v_floor/ceil/fract/frexp_mant_f64` and the result of `v_fract_f64` by the `FLOAT_MODE` f16/f64 denormal field (bits 7:6), but `v_ldexp_f64` was translated straight through `FPLdexp64` and never read that field. A shader in a denormal-flushing mode got the wrong result whenever the scale produced or consumed a subnormal: with f64 denormals flushed, `v_ldexp_f64 0x0000000000000001, 54` (the minimum denormal scaled up by 2^54) returned `0x0030000000000000` instead of the hardware's `+0`, because the denormal input was not flushed first; and `v_ldexp_f64 0x3ff0000000000000, -1023` (1.0 scaled to 2^-1023) returned the denormal `0x0008000000000000` instead of `+0`. `float64Unary` now flushes the `v_ldexp_f64` input with the existing `flushF64Bits(bits, 0x40u)` helper when bit 0 of the field is clear, and flushes a tiny result to a zero of the input's sign when bit 1 is clear. Tininess is tested before rounding, as the hardware does: the result is tiny when the input is finite and nonzero and its true exponent plus the scale n is below -1022. The input's true exponent is `exp - 1023` for a normal and `msb(mantissa) - 1074` for a kept denormal; n is clamped to [-2200, 2200] first, which cannot change the comparison because the f64 exponent range is narrower and so leaves the sign of `exponent + n + 1022` unchanged. The exact-value test keeps the tie right: `0x3fffffffffffffff * 2^-1023` is below 2^-1022 and flushes to `+0` in modes 0 and 1 even though it would round up to `0x0010000000000000`, which is what modes 2 and 3 return. Signaling-NaN quieting is unchanged (IEEE=1 quiets, IEEE=0 keeps), computed from the NaN bits. Only `v_ldexp_f64` is touched; the other `float64Unary` opcodes and the decoder's operand support are unchanged, and a shader without a known float mode keeps the previous lowering (mode-3 results). Sources: - AMD "RDNA2 Instruction Set Architecture" (v_ldexp_f64 scales src0 by the integer src1); the f16/f64 denormal field of `FLOAT_MODE` controls f64 denormals, per the LLVM AMDGPU kernel descriptor documentation. - Hardware measurements on gfx1101 with tools/hw-oracle, below. ### Tested Measured on RDNA3 (gfx1101, Radeon RX 7700 XT) with tools/hw-oracle; not measured on the PS5's gfx1013 or on RDNA2. All tables are at DX10_CLAMP=1, round to nearest even; both IEEE settings give the same non-NaN results. - New execution test `F64LdexpDenormalModes.cpp` (ctest `agc_driver_f64_ldexp_denormal_modes`): 20 f64 inputs (signed zeros, denormals, the minimum normal and one above it, 1.0, 1.5, the tininess tie `0x3fffffffffffffff`, 2.0, the largest finite value, infinities and quiet and signaling NaNs) run through two forms, `v_ldexp_f64` with a VGPR exponent and with the inline constant -1, in the nine modes of the f64 add/mul test (the four denormal fields at IEEE 0 and 1, and a shader without a known float mode). Expected values are the gfx1101 results. - Red: with the fix reverted to `origin/main` and the test present, it fails at `AGC graphics: v_ldexp_f64 by v6 f64 denormal mode 0, IEEE mode on of 0x0000000000000001 is 0x0030000000000000, expected 0x0000000000000000` (the test throws on the first wrong result). After restoring the fix it passes: `f64 ldexp denormal mode tests passed, 0 device-dependent results skipped`. - Hardware model: a sweep of the fixed recompiler against the oracle over 658 rows per mode (src0 edge and boundary values scaled by exponents around the denormal boundary) in all eight IEEE x field combinations gives 0 mismatches; `probe-main` (unfixed) gives 100/45/68/0 in fields 0/1/2/3 at each IEEE setting, 426 total. A further 4096 random rows give 0 mismatches for the fix and 122 for main. - Paired validation-layer runs (`VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `VK_LOADER_DEBUG=layer`) over `agc_driver_f64_ldexp_denormal_modes`, `agc_driver_nan_quieting` (runs `v_ldexp_f64`), `agc_driver_f64_add_mul_denormal_modes`, `agc_driver_f64_rounding_denormal_modes` and `agc_driver_div_fixup_f64_denormal_modes`. State A (fix reverted, test present): the layer is inserted 5 times, no missing-layer line, 0 VUID messages, and only the new test fails (4 of 5 pass). State B (fix): the layer is inserted 5 times, no missing-layer line, 0 VUID messages, 5 of 5 pass. B's VUID count does not exceed A's. - lavapipe: `agc_driver_f64_ldexp_denormal_modes` passes on llvmpipe (LLVM 20.1.2), Mesa 25.2.8, in an Ubuntu 24.04 container with the Linux CI configuration, in 0.52 s, 0 device-dependent results skipped. Hardware results on gfx1101 (FLOAT_MODE field, IEEE=0, DX10_CLAMP=1, round to nearest even). The recompiler result on `origin/main` is in parentheses where it differed; with the fix every result matches. | src0 | n | field 0 | field 1 | field 2 | field 3 | |---|---|---|---|---|---| | 0x0000000000000001 | 54 | 0x0000000000000000 (0x0030000000000000) | 0x0030000000000000 | 0x0000000000000000 (0x0030000000000000) | 0x0030000000000000 | | 0x000fffffffffffff | 1 | 0x0000000000000000 (0x001ffffffffffffe) | 0x001ffffffffffffe | 0x0000000000000000 (0x001ffffffffffffe) | 0x001ffffffffffffe | | 0x0010000000000000 | -1 | 0x0000000000000000 (0x0008000000000000) | 0x0000000000000000 (0x0008000000000000) | 0x0008000000000000 | 0x0008000000000000 | | 0x3ff0000000000000 | -1023 | 0x0000000000000000 (0x0008000000000000) | 0x0000000000000000 (0x0008000000000000) | 0x0008000000000000 | 0x0008000000000000 | | 0x3fffffffffffffff | -1023 | 0x0000000000000000 (0x0010000000000000) | 0x0000000000000000 (0x0010000000000000) | 0x0010000000000000 | 0x0010000000000000 | | 0x4000000000000000 | -1022 | 0x0020000000000000 | 0x0020000000000000 | 0x0020000000000000 | 0x0020000000000000 | | 0x7fefffffffffffff | 0 | 0x7fefffffffffffff | 0x7fefffffffffffff | 0x7fefffffffffffff | 0x7fefffffffffffff | Fields 0 and 2 clear bit 0, so the denormal src0 `0x000fffffffffffff` and `0x0000000000000001` are flushed to `+0` before scaling; fields 0 and 1 clear bit 1, so the tiny results of rows 3-5 flush to `+0`. The tie row `0x3fffffffffffffff` scaled by 2^-1023 is below 2^-1022 and flushes in fields 0 and 1, while fields 2 and 3 return the rounded `0x0010000000000000`. A signaling NaN src0 (`0x7ff0000000000001`) is returned unchanged with IEEE=0 and quieted to `0x7ff8000000000001` with IEEE=1, unchanged by the denormal field. `GPUs tested:` AMD Radeon RX 7700 XT (gfx1101), RADV, Mesa 26.2.4, Gentoo Linux (kernel 7.2.11); llvmpipe (LLVM 20.1.2), Mesa 25.2.8, Ubuntu 24.04 container with the Linux CI configuration. ### 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) - [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 7700 XT (gfx1101), RADV, Mesa 26.2.4, Gentoo Linux; llvmpipe (LLVM 20.1.2), Mesa 25.2.8, Ubuntu 24.04 CI container - [x] AI-assisted: yes
MarcZX10 commented 2026-10-31 09:25:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T09:25:56Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The new lowering encodes tininess-before-rounding for f64 v_ldexp from gfx1101 results, while the PR explicitly has no RDNA2 or PS5 gfx1013 measurement for this target-sensitive boundary.

What I ran

Reviewed head 64dfa4ed4cea684bba15baf45ea4cfe2a9b603a3. GitHub reports PR base 809c7fa2dfb1b21e2b31b3114b7d51bc14ee88ab; fresh checks and the merge preview used current main d8ffa97effa1ab0113dc265d936e94322045875d, against which the preview was clean. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5; no compiler was invoked.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13842 --no-negative-controls --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13842
git diff --check refs/remotes/upstream/main...refs/remotes/upstream/pr-13842
python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/remotes/upstream/pr-13842 --title 'fix(shader): flush v_ldexp_f64 denormals by the f64 denormal field' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13842/pr-body.md
git merge-tree --write-tree refs/remotes/upstream/main refs/remotes/upstream/pr-13842

Results

Check Result
Diff check and conventions Passed against current main.
Merge preview Clean against current main.
Test registration The new execution test is included by the existing CMake execution-test glob.
No-build precheck Its diff, conventions/template, and live mergeability checks passed; isolated-copy ABI/test-quality helper failures are missing local-only scripts, not product failures.
Local build / focused C++ test Not run; the initial review does not build.
Hosted CI Eligibility, conventions, portability, intake, labels, report, Ubuntu/Windows relinker, and relinker ASan passed. Linux product job was skipped; Windows product was in progress and macOS relinker jobs were queued at the latest snapshot.
Selected unedited command output

Conventions:

All conventions checks passed.

Merge preview:

2f4af76f2b3752e6758400ad6a273fe46c010f75

Negative control

Assertion Mutation Result
The test detects the previous lowering for a denormal input in flush-input mode. Author reports reverting the implementation while keeping the test. Author-reported failure; not independently run here.

Findings

Blocking

The test pins 0x3fffffffffffffff * 2^-1023 to flush in modes 0 and 1 even though the rounded result is the minimum normal. That is the specific before-rounding behavior implemented in the change. The PR reports hardware measurements only on gfx1101/RDNA3 and says RDNA2 and the PS5's gfx1013 were not measured; the cited ISA references establish the scale operation and denormal controls, but not this rounding-boundary result. Please provide a focused RDNA2 measurement or an authoritative source for this exact v_ldexp_f64 boundary before applying the result as general PS5 behavior.

Non-blocking

No other source-level defect was confirmed. The author-reported gfx1101 and lavapipe runs, including the negative control, were not independently reproduced here.

Sources

Not verified

No local build, CTest run, or negative control was performed. The hardware and lavapipe results are author-reported; no RDNA2 or PS5 gfx1013 run was available. The latest hosted Windows and macOS jobs had not finished.

To get this to a good state

Please provide the RDNA2 result or authoritative evidence for the exact rounding boundary, then update the PR. I will rerun the same no-build checks on the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5722159976 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13842#pullrequestreview-5722159976). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T09:25:56Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The new lowering encodes tininess-before-rounding for f64 `v_ldexp` from gfx1101 results, while the PR explicitly has no RDNA2 or PS5 gfx1013 measurement for this target-sensitive boundary. ## What I ran Reviewed head `64dfa4ed4cea684bba15baf45ea4cfe2a9b603a3`. GitHub reports PR base `809c7fa2dfb1b21e2b31b3114b7d51bc14ee88ab`; fresh checks and the merge preview used current `main` `d8ffa97effa1ab0113dc265d936e94322045875d`, against which the preview was clean. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5; no compiler was invoked. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13842 --no-negative-controls --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13842 git diff --check refs/remotes/upstream/main...refs/remotes/upstream/pr-13842 python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/remotes/upstream/pr-13842 --title 'fix(shader): flush v_ldexp_f64 denormals by the f64 denormal field' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13842/pr-body.md git merge-tree --write-tree refs/remotes/upstream/main refs/remotes/upstream/pr-13842 ``` ## Results | Check | Result | |---|---| | Diff check and conventions | Passed against current `main`. | | Merge preview | Clean against current `main`. | | Test registration | The new execution test is included by the existing CMake execution-test glob. | | No-build precheck | Its diff, conventions/template, and live mergeability checks passed; isolated-copy ABI/test-quality helper failures are missing local-only scripts, not product failures. | | Local build / focused C++ test | Not run; the initial review does not build. | | Hosted CI | Eligibility, conventions, portability, intake, labels, report, Ubuntu/Windows relinker, and relinker ASan passed. Linux product job was skipped; Windows product was in progress and macOS relinker jobs were queued at the latest snapshot. | <details><summary>Selected unedited command output</summary> Conventions: ```text All conventions checks passed. ``` Merge preview: ```text 2f4af76f2b3752e6758400ad6a273fe46c010f75 ``` </details> ## Negative control | Assertion | Mutation | Result | |---|---|---| | The test detects the previous lowering for a denormal input in flush-input mode. | Author reports reverting the implementation while keeping the test. | Author-reported failure; not independently run here. | ## Findings ### Blocking The test pins `0x3fffffffffffffff * 2^-1023` to flush in modes 0 and 1 even though the rounded result is the minimum normal. That is the specific before-rounding behavior implemented in the change. The PR reports hardware measurements only on gfx1101/RDNA3 and says RDNA2 and the PS5's gfx1013 were not measured; the cited ISA references establish the scale operation and denormal controls, but not this rounding-boundary result. Please provide a focused RDNA2 measurement or an authoritative source for this exact `v_ldexp_f64` boundary before applying the result as general PS5 behavior. ### Non-blocking No other source-level defect was confirmed. The author-reported gfx1101 and lavapipe runs, including the negative control, were not independently reproduced here. ## Sources - [Changed `v_ldexp_f64` lowering at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/64dfa4ed4cea684bba15baf45ea4cfe2a9b603a3/core/shader/recompiler/Translation/src/Float64Instructions.cpp) - [Added denormal-mode test and boundary row at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/64dfa4ed4cea684bba15baf45ea4cfe2a9b603a3/core/libs/prx/libSceAgcDriver/tests/execution/F64LdexpDenormalModes.cpp) - [The PR's technical-debt note that gfx1013/RDNA2 remain unmeasured](https://github.com/boykopovar/AnyPS5/blob/64dfa4ed4cea684bba15baf45ea4cfe2a9b603a3/docs/dev/debt/shader.md) ## Not verified No local build, CTest run, or negative control was performed. The hardware and lavapipe results are author-reported; no RDNA2 or PS5 gfx1013 run was available. The latest hosted Windows and macOS jobs had not finished. ## To get this to a good state Please provide the RDNA2 result or authoritative evidence for the exact rounding boundary, then update the PR. I will rerun the same no-build checks on the new head.
MarcZX10 commented 2026-10-31 11:42:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T11:42:19Z.

Review: APPROVED


Re-checked — new evidence, looks good

A participant reports that the exact-head denormal test passes on an RX 6700 XT, addressing the hardware-evidence gap from my prior review.

What I ran

Rechecked head 64dfa4ed4cea684bba15baf45ea4cfe2a9b603a3 against PR base 809c7fa2dfb1b21e2b31b3114b7d51bc14ee88ab; the merge preview was clean against current main cbed91529193c47194bef11811906c7cb6054af1. The participant's test used main 8f55414024c614b32548254e59e80bd3f0085231 plus this exact PR head; none of the PR's touched paths changed from that main to current main. Environment: Linux x86_64, Python 3.11.2. I did not build or run C++ tests locally.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13842 --no-negative-controls --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13842-followup
gh pr checks 13842 --repo boykopovar/AnyPS5
git diff --name-only 8f55414024c614b32548254e59e80bd3f0085231..cbed91529193c47194bef11811906c7cb6054af1 -- core/shader/recompiler/Translation/src/Float64Instructions.cpp core/libs/prx/libSceAgcDriver/tests/execution/F64LdexpDenormalModes.cpp

Results

Check Result
Diff and conventions Passed
Merge preview Clean against current main
Hosted checks Windows, conventions, eligibility, intake, labels, portability, report, relinker, and relinker ASan passed; Linux product and specialized jobs were skipped
RX 6700 XT test A participant reports agc_driver_f64_ldexp_denormal_modes passed 3/3 on Windows 11 with the Khronos validation layer loaded 3 times and no VUIDs. I did not run this test.
Local product build/test Not run
Precheck helper copies ABI and test-quality scripts were absent from the isolated checkout; ABI is not applicable to this shader/test change
Unedited local convention output
All conventions checks passed.

Findings

Blocking

None found on this head. The added lowering's exact rounding-boundary behavior now has reported test evidence on the RX 6700 XT target, and no other source-level blocker was found in my prior review.

Sources

Not verified

I did not build locally, repeat the Windows GPU run, or test on a physical PS5/gfx1013. The RX 6700 XT result is participant-reported; hosted Linux product tests were skipped.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5722561683 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13842#pullrequestreview-5722561683). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T11:42:19Z. **Review:** APPROVED --- # Re-checked — new evidence, looks good A participant reports that the exact-head denormal test passes on an RX 6700 XT, addressing the hardware-evidence gap from my prior review. ## What I ran Rechecked head `64dfa4ed4cea684bba15baf45ea4cfe2a9b603a3` against PR base `809c7fa2dfb1b21e2b31b3114b7d51bc14ee88ab`; the merge preview was clean against current `main` `cbed91529193c47194bef11811906c7cb6054af1`. The participant's test used `main` `8f55414024c614b32548254e59e80bd3f0085231` plus this exact PR head; none of the PR's touched paths changed from that main to current main. Environment: Linux x86_64, Python 3.11.2. I did not build or run C++ tests locally. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13842 --no-negative-controls --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13842-followup gh pr checks 13842 --repo boykopovar/AnyPS5 git diff --name-only 8f55414024c614b32548254e59e80bd3f0085231..cbed91529193c47194bef11811906c7cb6054af1 -- core/shader/recompiler/Translation/src/Float64Instructions.cpp core/libs/prx/libSceAgcDriver/tests/execution/F64LdexpDenormalModes.cpp ``` ## Results | Check | Result | |---|---| | Diff and conventions | Passed | | Merge preview | Clean against current `main` | | Hosted checks | Windows, conventions, eligibility, intake, labels, portability, report, relinker, and relinker ASan passed; Linux product and specialized jobs were skipped | | RX 6700 XT test | A participant reports `agc_driver_f64_ldexp_denormal_modes` passed 3/3 on Windows 11 with the Khronos validation layer loaded 3 times and no VUIDs. I did not run this test. | | Local product build/test | Not run | | Precheck helper copies | ABI and test-quality scripts were absent from the isolated checkout; ABI is not applicable to this shader/test change | <details><summary>Unedited local convention output</summary> ```text All conventions checks passed. ``` </details> ## Findings ### Blocking None found on this head. The added lowering's exact rounding-boundary behavior now has reported test evidence on the RX 6700 XT target, and no other source-level blocker was found in my prior review. ## Sources - [Updated `v_ldexp_f64` lowering at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/64dfa4ed4cea684bba15baf45ea4cfe2a9b603a3/core/shader/recompiler/Translation/src/Float64Instructions.cpp#L82-L116) - [Boundary inputs and denormal-mode test at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/64dfa4ed4cea684bba15baf45ea4cfe2a9b603a3/core/libs/prx/libSceAgcDriver/tests/execution/F64LdexpDenormalModes.cpp#L31-L36) - [RX 6700 XT exact-head test and validation-layer report](https://github.com/boykopovar/AnyPS5/pull/13842#issuecomment-6542852437) - [Hosted Windows CI run](https://github.com/boykopovar/AnyPS5/actions/runs/41187126200) - [AMD identifies the RX 6700 XT as an RDNA 2 GPU](https://www.amd.com/en/newsroom/press-releases/2021-3-3-amd-unveils-amd-radeon-rx-6700-xt-graphics-card-d.html) ## Not verified I did not build locally, repeat the Windows GPU run, or test on a physical PS5/gfx1013. The RX 6700 XT result is participant-reported; hosted Linux product tests were skipped.
MarcZX10 commented 2026-10-31 11:49:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T11:49:31Z.

Review: CHANGES_REQUESTED


Re-checked — changes requested

The denormal test can count an arbitrary wrong result as a device-dependent skip when the device does not support preserving f64 denormals.

What I ran

Reviewed exact head 64dfa4ed4cea684bba15baf45ea4cfe2a9b603a3 against PR base 809c7fa2dfb1b21e2b31b3114b7d51bc14ee88ab; its preview against current main 5de1621ff13712e8b3a6d70a2487b008d9ee80c3 is clean. Environment: Debian Linux x86_64, Python 3.11.2. I inspected the changed test and ran the no-build precheck; I did not build or run the C++ test.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13842

Results

Check Result
Diff, conventions and merge preview Passed.
C++ test and negative control Not run locally; both require an exact-head build.
Test-quality helper Could not run inside the isolated checkout because that helper is absent at this PR head.
Windows GPU test A participant reports 3/3 passes on an RX 6700 XT with the validation layer and no VUIDs; I did not independently reproduce it.

Negative control

Assertion Change to the code under test Outcome
Unsupported devices may skip only a known device-flushed result Substitute unrelated finite bits 0x12345678deadbeef for the minimum-denormal/scale-54 result Not run by me. A reviewer reports this value is accepted as a skip; the source predicate permits it because it never compares actual with an allowed flushed result.

Findings

Blocking

In Check, deviceDependent only asks whether another mode has a different expected value; Require(deviceDependent && !keepsDenormals, ...) then accepts any mismatching actual whenever preservation is unsupported. Please require actual to match an explicitly allowed flush result before counting a skip, and add a negative control showing an unrelated finite value fails. See the exact-head check and the reported mutation.

Non-blocking

None identified in this follow-up.

Not verified

I did not compile or run the test locally, independently verify the reported GPU run, or test PS5 hardware. The fresh precheck reports the exact head and base unchanged.

To get this to a good state

Add the allowed-result guard and the unrelated-value negative control, then rerun the focused test on the new head. I’ll re-check the same source and test path after that update.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5722586435 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13842#pullrequestreview-5722586435). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T11:49:31Z. **Review:** CHANGES_REQUESTED --- # Re-checked — changes requested The denormal test can count an arbitrary wrong result as a device-dependent skip when the device does not support preserving f64 denormals. ## What I ran Reviewed exact head `64dfa4ed4cea684bba15baf45ea4cfe2a9b603a3` against PR base `809c7fa2dfb1b21e2b31b3114b7d51bc14ee88ab`; its preview against current `main` `5de1621ff13712e8b3a6d70a2487b008d9ee80c3` is clean. Environment: Debian Linux x86_64, Python 3.11.2. I inspected the changed test and ran the no-build precheck; I did not build or run the C++ test. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13842 ``` ## Results | Check | Result | |---|---| | Diff, conventions and merge preview | Passed. | | C++ test and negative control | Not run locally; both require an exact-head build. | | Test-quality helper | Could not run inside the isolated checkout because that helper is absent at this PR head. | | Windows GPU test | A participant reports 3/3 passes on an RX 6700 XT with the validation layer and no VUIDs; I did not independently reproduce it. | ## Negative control | Assertion | Change to the code under test | Outcome | |---|---|---| | Unsupported devices may skip only a known device-flushed result | Substitute unrelated finite bits `0x12345678deadbeef` for the minimum-denormal/scale-54 result | Not run by me. A reviewer reports this value is accepted as a skip; the source predicate permits it because it never compares `actual` with an allowed flushed result. | ## Findings ### Blocking In `Check`, `deviceDependent` only asks whether another mode has a different expected value; `Require(deviceDependent && !keepsDenormals, ...)` then accepts any mismatching `actual` whenever preservation is unsupported. Please require `actual` to match an explicitly allowed flush result before counting a skip, and add a negative control showing an unrelated finite value fails. See [the exact-head check](https://github.com/boykopovar/AnyPS5/blob/64dfa4ed4cea684bba15baf45ea4cfe2a9b603a3/core/libs/prx/libSceAgcDriver/tests/execution/F64LdexpDenormalModes.cpp#L272-L289) and [the reported mutation](https://github.com/boykopovar/AnyPS5/pull/13842#issuecomment-6541672523). ### Non-blocking None identified in this follow-up. ## Not verified I did not compile or run the test locally, independently verify the reported GPU run, or test PS5 hardware. The fresh precheck reports the exact head and base unchanged. ## To get this to a good state Add the allowed-result guard and the unrelated-value negative control, then rerun the focused test on the new head. I’ll re-check the same source and test path after that update.
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!13842
No description provided.