fix(shader): preserve f64 denormals when supported by Vulkan #2977

Merged
MarcZX10 merged 3 commits from upstream-pr/2977 into main 2026-10-11 07:15:33 +00:00
MarcZX10 commented 2026-10-10 19:19:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-10T19:19:26Z.


What

Fixes #2860. Carry the device's shaderDenormPreserveFloat64 support into shader compilation, emit the SPIR-V 64-bit DenormPreserve mode only when the device advertises it, and include the capability in shader cache keys and serialized requests (version 16). The F64 FMA test runs on devices with shaderFloat64; if a device without denorm-preserve support flushes the tested subnormals, it skips that runtime result.

DenormPreserve 64 is enabled only when Vulkan reports denormBehaviorIndependence == VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL. The backend does not yet emit coupled execution modes for 32_BIT_ONLY or NONE, so f64 denormal preservation is disabled for those properties. The Vulkan specification requires identical denorm modes for widths that are not independent (reference).

A device-independent CTest recompiles the f64 shader with float64DenormPreserve enabled and disabled and checks for the 64-bit OpExecutionMode DenormPreserve in the generated SPIR-V. The existing F64 execution test remains the runtime check on capable hardware.

This carries the issue-linked change authored by ThatsLeo; the original commit author is preserved.

Tested

  • Linux x86_64, GCC 12.2, Release: built agc_driver_f64_fma_subnormals_tests and dependencies. agc_driver_f64_denorm_preserve_spirv and agc_driver_f64_fma_subnormals completed on local llvmpipe.
  • Windows 11, WinLibs GCC 15.2.0 r7, Release, corrected head 5e00b269 merged onto current main: on an RTX 5060 Laptop (driver 617.42), agc_driver_f64_fma_subnormals and agc_driver_f64_denorm_preserve_spirv passed 3/3 runs each. The device reports shaderDenormPreserveFloat64 = false; the runtime test now runs and passes without the explicit mode.
  • No RADV validation-layer result was obtained. The current execution environment has neither the Khronos validation layer nor a Vulkan device node, so the requested RADV validation-layer run could not be performed here.
  • python3 tools/check_conventions.py --base upstream/main and git diff --check passed. check_test_registration.py could not run because Ninja is not installed; CTest configuration discovered and ran the new test.

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 in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4813799791 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2977). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-10T19:19:26Z. --- ### What Fixes #2860. Carry the device's `shaderDenormPreserveFloat64` support into shader compilation, emit the SPIR-V 64-bit `DenormPreserve` mode only when the device advertises it, and include the capability in shader cache keys and serialized requests (version 16). The F64 FMA test runs on devices with `shaderFloat64`; if a device without denorm-preserve support flushes the tested subnormals, it skips that runtime result. `DenormPreserve 64` is enabled only when Vulkan reports `denormBehaviorIndependence == VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL`. The backend does not yet emit coupled execution modes for `32_BIT_ONLY` or `NONE`, so f64 denormal preservation is disabled for those properties. The Vulkan specification requires identical denorm modes for widths that are not independent ([reference](https://docs.vulkan.org/refpages/latest/refpages/source/VkShaderFloatControlsIndependence.html)). A device-independent CTest recompiles the f64 shader with `float64DenormPreserve` enabled and disabled and checks for the 64-bit `OpExecutionMode DenormPreserve` in the generated SPIR-V. The existing F64 execution test remains the runtime check on capable hardware. This carries the issue-linked change authored by ThatsLeo; the original commit author is preserved. ### Tested - Linux x86_64, GCC 12.2, Release: built `agc_driver_f64_fma_subnormals_tests` and dependencies. `agc_driver_f64_denorm_preserve_spirv` and `agc_driver_f64_fma_subnormals` completed on local llvmpipe. - Windows 11, WinLibs GCC 15.2.0 r7, Release, corrected head `5e00b269` merged onto current `main`: on an RTX 5060 Laptop (driver 617.42), `agc_driver_f64_fma_subnormals` and `agc_driver_f64_denorm_preserve_spirv` passed 3/3 runs each. The device reports `shaderDenormPreserveFloat64 = false`; the runtime test now runs and passes without the explicit mode. - No RADV validation-layer result was obtained. The current execution environment has neither the Khronos validation layer nor a Vulkan device node, so the requested RADV validation-layer run could not be performed here. - `python3 tools/check_conventions.py --base upstream/main` and `git diff --check` passed. `check_test_registration.py` could not run because Ninja is not installed; CTest configuration discovered and ran the new test. ### Checklist - [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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
fma-rc commented 2026-10-10 22:26:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-10T22:26:23Z.


Ran 14f96919 on Linux (GCC 16.2.1) on two devices. From vulkaninfo: the RTX 5080 (NVIDIA 615.78.08) reports shaderDenormPreserveFloat64 = false, the Radeon 610M on RADV reports true with denormBehaviorIndependence = 32_BIT_ONLY.

agc_driver_f64_fma_subnormals is skipped on the RTX 5080, also with ANYPS5_REQUIRE_VULKAN=1, and passes on RADV. agc_shader_memory and agc_shader_disk_cache pass on both.

On RADV all three still pass after I remove the four new lines in DefineModule that emit DenormPreserve 64 and rebuild, so nothing here goes red if the execution mode is not declared.

I did not look at whether declaring it for 64 bits alone is allowed under 32_BIT_ONLY; the device property is not read in this change.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6102839346 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2977#issuecomment-6102839346). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-10T22:26:23Z. --- Ran 14f96919 on Linux (GCC 16.2.1) on two devices. From `vulkaninfo`: the RTX 5080 (NVIDIA 615.78.08) reports `shaderDenormPreserveFloat64 = false`, the Radeon 610M on RADV reports `true` with `denormBehaviorIndependence = 32_BIT_ONLY`. `agc_driver_f64_fma_subnormals` is skipped on the RTX 5080, also with `ANYPS5_REQUIRE_VULKAN=1`, and passes on RADV. `agc_shader_memory` and `agc_shader_disk_cache` pass on both. On RADV all three still pass after I remove the four new lines in `DefineModule` that emit `DenormPreserve 64` and rebuild, so nothing here goes red if the execution mode is not declared. I did not look at whether declaring it for 64 bits alone is allowed under `32_BIT_ONLY`; the device property is not read in this change.
adriadam10 commented 2026-10-10 23:43:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T23:43:49Z.

Review: CHANGES_REQUESTED


Built and ran this merged onto current main: agc_shader_memory, agc_shader_disk_cache and agc_driver_f64_fma_subnormals pass on RADV. The plumbing (target field, cache key, serializer v16 with the legacy-version checks) looks right. Two things before merge:

  • Nothing pins the new execution mode. I removed the four lines in SpirvModuleSetup.cpp:150-153 (capability + ExecutionModeDenormPreserve 64) and rebuilt: all three tests stay green, as @fma-rc found. RADV preserves f64 denormals anyway and lavapipe/NVIDIA skip, so no device we can run turns red if the mode is missing. Please add a test that recompiles an f64 shader with float64DenormPreserve true and false and scans the SPIR-V for OpExecutionMode ... DenormPreserve 64 (like the f16 scan in tests/Float16Conversion.cpp:65), so the declaration is pinned on every device.
  • denormBehaviorIndependence. RADV reports 32_BIT_ONLY, where 16- and 64-bit float controls must be set identically. A module with f64 but no f16 code now declares 64 without 16, and a module that also uses the native f16 path declares both. Please check this against the spec/validation layer (run the f64 test on RADV with the validation layer on) and, if it matters, gate the flag on the property or declare both widths together, and say which in the description.

Once the SPIR-V test is in and the independence question is answered, this looks good to merge.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5481219887 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2977#pullrequestreview-5481219887). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-10T23:43:49Z. **Review:** CHANGES_REQUESTED --- Built and ran this merged onto current `main`: `agc_shader_memory`, `agc_shader_disk_cache` and `agc_driver_f64_fma_subnormals` pass on RADV. The plumbing (target field, cache key, serializer v16 with the legacy-version checks) looks right. Two things before merge: - **Nothing pins the new execution mode.** I removed the four lines in `SpirvModuleSetup.cpp:150-153` (capability + `ExecutionModeDenormPreserve 64`) and rebuilt: all three tests stay green, as @fma-rc found. RADV preserves f64 denormals anyway and lavapipe/NVIDIA skip, so no device we can run turns red if the mode is missing. Please add a test that recompiles an f64 shader with `float64DenormPreserve` true and false and scans the SPIR-V for `OpExecutionMode ... DenormPreserve 64` (like the f16 scan in `tests/Float16Conversion.cpp:65`), so the declaration is pinned on every device. - **`denormBehaviorIndependence`.** RADV reports `32_BIT_ONLY`, where 16- and 64-bit float controls must be set identically. A module with f64 but no f16 code now declares 64 without 16, and a module that also uses the native f16 path declares both. Please check this against the spec/validation layer (run the f64 test on RADV with the validation layer on) and, if it matters, gate the flag on the property or declare both widths together, and say which in the description. Once the SPIR-V test is in and the independence question is answered, this looks good to merge.
MarcZX10 commented 2026-10-11 01:33:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T01:33:03Z.


Thanks for raising both points. The Vulkan execution-environment rule confirms that 32_BIT_ONLY requires the 16-bit and 64-bit denorm execution modes to match; NONE requires all widths to match. The current backend does not emit the coupled modes, so I gated float64DenormPreserve on shaderDenormPreserveFloat64 and denormBehaviorIndependence == VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL. Devices reporting other independence values no longer receive a potentially invalid 64-bit mode. The limitation is recorded in TechnicalDebt.md and the PR description.

I also added agc_driver_f64_denorm_preserve_spirv, which recompiles the f64 shader with the target flag both ways and scans for OpExecutionMode DenormPreserve 64. It passes on Linux GCC 12.2 Release. The existing runtime test skipped on this machine because llvmpipe does not expose the required capability, so I do not have a corrected-head RADV validation-layer result.

Pushed the update in 0000e4c20 (fix(shader): respect float control independence). The conventions and diff checks pass; the repository's test-registration script could not run because this environment lacks Ninja, but CTest registered and ran the new case.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104229269 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2977#issuecomment-6104229269). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-11T01:33:03Z. --- Thanks for raising both points. The Vulkan execution-environment rule confirms that `32_BIT_ONLY` requires the 16-bit and 64-bit denorm execution modes to match; `NONE` requires all widths to match. The current backend does not emit the coupled modes, so I gated `float64DenormPreserve` on `shaderDenormPreserveFloat64` **and** `denormBehaviorIndependence == VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL`. Devices reporting other independence values no longer receive a potentially invalid 64-bit mode. The limitation is recorded in `TechnicalDebt.md` and the PR description. I also added `agc_driver_f64_denorm_preserve_spirv`, which recompiles the f64 shader with the target flag both ways and scans for `OpExecutionMode DenormPreserve 64`. It passes on Linux GCC 12.2 Release. The existing runtime test skipped on this machine because llvmpipe does not expose the required capability, so I do not have a corrected-head RADV validation-layer result. Pushed the update in `0000e4c20` (`fix(shader): respect float control independence`). The conventions and diff checks pass; the repository's test-registration script could not run because this environment lacks Ninja, but CTest registered and ran the new case.
Silverash-i8 commented 2026-10-11 01:51:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-11T01:51:04Z.


Windows run, since the PR has no Windows results: Windows 11, WinLibs GCC 15.2.0 r7, Release, head merged onto main d31b57a4, RTX 5060 Laptop (driver 617.42) and the Arrow Lake iGPU.

  • agc_shader_memory and agc_shader_disk_cache pass on both GPUs.
  • Arrow Lake iGPU: agc_driver_f64_fma_subnormals failed on main (the device has no shaderFloat64) and now skips, so that one is fixed here.
  • RTX 5060: the same test passed on plain main d31b57a4 and now skips with "the device has no shaderDenormPreserveFloat64". This driver reports shaderDenormPreserveFloat64 = false (vulkaninfo), yet the v_fma_f64 subnormal results come out right without the execution mode. So on NVIDIA here the skip turns a passing check into no check.

Maybe the skip could key on the result instead of the property (run it, and skip only when the device lacks shaderFloat64), or keep running where the property is false and treat a flush as the skip case. #2860 (ThatsLeo's fix/shader-f64-denorm-preserve) uses the same property check, so the same applies there.

AI-assisted (Claude Code); I ran this on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104354874 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2977#issuecomment-6104354874). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-11T01:51:04Z. --- Windows run, since the PR has no Windows results: Windows 11, WinLibs GCC 15.2.0 r7, Release, head merged onto `main` d31b57a4, RTX 5060 Laptop (driver 617.42) and the Arrow Lake iGPU. - `agc_shader_memory` and `agc_shader_disk_cache` pass on both GPUs. - Arrow Lake iGPU: `agc_driver_f64_fma_subnormals` failed on `main` (the device has no `shaderFloat64`) and now skips, so that one is fixed here. - RTX 5060: the same test **passed** on plain `main` d31b57a4 and now **skips** with "the device has no shaderDenormPreserveFloat64". This driver reports `shaderDenormPreserveFloat64 = false` (vulkaninfo), yet the v_fma_f64 subnormal results come out right without the execution mode. So on NVIDIA here the skip turns a passing check into no check. Maybe the skip could key on the result instead of the property (run it, and skip only when the device lacks `shaderFloat64`), or keep running where the property is false and treat a flush as the skip case. #2860 (ThatsLeo's `fix/shader-f64-denorm-preserve`) uses the same property check, so the same applies there. AI-assisted (Claude Code); I ran this on my machine.
MarcZX10 commented 2026-10-11 03:14:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T03:14:55Z.


Thanks for testing this on both NVIDIA and Intel and for showing that the RTX 5060 passes the f64 subnormal cases without the explicit mode. I updated the runtime test accordingly: it now runs on any device with shaderFloat64, including when shaderDenormPreserveFloat64 is false. Matching results pass; if such a device flushes subnormals, the test reports a skip; a device advertising preserve support must still pass. On the rebased head 5e00b269c, Linux Release build, agc_driver_f64_fma_subnormals, and agc_driver_f64_denorm_preserve_spirv all passed on local llvmpipe. The Windows NVIDIA run predates this adjustment, so I have not claimed corrected-head GPU validation.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104931819 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2977#issuecomment-6104931819). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-11T03:14:55Z. --- Thanks for testing this on both NVIDIA and Intel and for showing that the RTX 5060 passes the f64 subnormal cases without the explicit mode. I updated the runtime test accordingly: it now runs on any device with `shaderFloat64`, including when `shaderDenormPreserveFloat64` is false. Matching results pass; if such a device flushes subnormals, the test reports a skip; a device advertising preserve support must still pass. On the rebased head `5e00b269c`, Linux Release build, `agc_driver_f64_fma_subnormals`, and `agc_driver_f64_denorm_preserve_spirv` all passed on local llvmpipe. The Windows NVIDIA run predates this adjustment, so I have not claimed corrected-head GPU validation.
Silverash-i8 commented 2026-10-11 03:18:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-11T03:18:42Z.


@MarcZX100 checked the new head 5e00b269 on the RTX 5060 (driver 617.42, which reports shaderDenormPreserveFloat64 = false): Windows 11, WinLibs GCC 15.2.0 r7, Release, merged onto current main. agc_driver_f64_fma_subnormals now runs and passes ("v_fma_f64 subnormal tests passed") instead of skipping, and agc_driver_f64_denorm_preserve_spirv passes, 3/3 runs each.

I didn't rerun the Arrow Lake iGPU this time: its driver is in a bad state after a run of GPU watchdog resets earlier tonight (see #2832), so results from it aren't trustworthy until I reset it. It has no shaderFloat64, so it should still skip there; I'll confirm after the reset.

AI-assisted (Claude Code); I ran this on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104956675 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2977#issuecomment-6104956675). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-11T03:18:42Z. --- @MarcZX100 checked the new head `5e00b269` on the RTX 5060 (driver 617.42, which reports `shaderDenormPreserveFloat64 = false`): Windows 11, WinLibs GCC 15.2.0 r7, Release, merged onto current `main`. `agc_driver_f64_fma_subnormals` now runs and passes ("v_fma_f64 subnormal tests passed") instead of skipping, and `agc_driver_f64_denorm_preserve_spirv` passes, 3/3 runs each. I didn't rerun the Arrow Lake iGPU this time: its driver is in a bad state after a run of GPU watchdog resets earlier tonight (see #2832), so results from it aren't trustworthy until I reset it. It has no `shaderFloat64`, so it should still skip there; I'll confirm after the reset. AI-assisted (Claude Code); I ran this on my machine.
MarcZX10 commented 2026-10-11 03:20:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T03:20:12Z.


Thanks for validating the corrected head on the RTX 5060. That confirms the test now executes and passes when shaderDenormPreserveFloat64 is false, while the SPIR-V mode test also passes. I updated the Tested section with your Windows 3/3 results; the Arrow Lake run can be added once its driver is stable again.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104966772 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2977#issuecomment-6104966772). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-11T03:20:12Z. --- Thanks for validating the corrected head on the RTX 5060. That confirms the test now executes and passes when `shaderDenormPreserveFloat64` is false, while the SPIR-V mode test also passes. I updated the Tested section with your Windows 3/3 results; the Arrow Lake run can be added once its driver is stable again.
MarcZX10 commented 2026-10-11 04:13:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T04:13:01Z.


I updated the PR description with the corrected-head RTX 5060 results and the exact remaining validation gap. The implementation gates the 64-bit mode on VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL; the SPIR-V test pins the mode, and the corrected runtime test runs on shaderFloat64 devices even when shaderDenormPreserveFloat64 is false. The Windows RTX 5060 run passes both tests 3/3. I could not perform the specifically requested RADV + Khronos validation-layer run in this environment: neither the validation layer nor a Vulkan device node is available here, so I have not claimed that result.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6105329083 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2977#issuecomment-6105329083). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-11T04:13:01Z. --- I updated the PR description with the corrected-head RTX 5060 results and the exact remaining validation gap. The implementation gates the 64-bit mode on `VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL`; the SPIR-V test pins the mode, and the corrected runtime test runs on `shaderFloat64` devices even when `shaderDenormPreserveFloat64` is false. The Windows RTX 5060 run passes both tests 3/3. I could not perform the specifically requested RADV + Khronos validation-layer run in this environment: neither the validation layer nor a Vulkan device node is available here, so I have not claimed that result.
fma-rc commented 2026-10-11 05:04:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-11T05:04:36Z.


Ran the RADV plus validation layer check on head 5e00b269 (it sits on main 961b25fe): Linux, GCC 16.2.1, Radeon 610M on RADV (gfx1036), which reports shaderDenormPreserveFloat64 = true with denormBehaviorIndependence = 32_BIT_ONLY. VK_LAYER_KHRONOS_validation 1.4.363 was loaded through VK_INSTANCE_LAYERS; the loader log shows it inserted and the RADV device selected.

All ten f64 tests pass, including agc_driver_f64_fma_subnormals and agc_driver_f64_denorm_preserve_spirv, and the layer prints no message. Without the layer the result is the same.

As a control I removed the denormBehaviorIndependence == VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL clause from the gate in VulkanDevice.cpp, so that only shaderDenormPreserveFloat64 decides on this device, and reran with the layer: the same ten pass and there is still no validation message. So the layer does not separate the two here. I have not checked whether this layer version tests the independence rule at all.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6105674592 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2977#issuecomment-6105674592). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-11T05:04:36Z. --- Ran the RADV plus validation layer check on head 5e00b269 (it sits on `main` 961b25fe): Linux, GCC 16.2.1, Radeon 610M on RADV (gfx1036), which reports `shaderDenormPreserveFloat64 = true` with `denormBehaviorIndependence = 32_BIT_ONLY`. `VK_LAYER_KHRONOS_validation` 1.4.363 was loaded through `VK_INSTANCE_LAYERS`; the loader log shows it inserted and the RADV device selected. All ten f64 tests pass, including `agc_driver_f64_fma_subnormals` and `agc_driver_f64_denorm_preserve_spirv`, and the layer prints no message. Without the layer the result is the same. As a control I removed the `denormBehaviorIndependence == VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL` clause from the gate in `VulkanDevice.cpp`, so that only `shaderDenormPreserveFloat64` decides on this device, and reran with the layer: the same ten pass and there is still no validation message. So the layer does not separate the two here. I have not checked whether this layer version tests the independence rule at all.
adriadam10 commented 2026-10-11 07:15:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T07:15:30Z.

Review: APPROVED


Built and ran this merged onto current main: agc_shader_memory, agc_shader_disk_cache, agc_driver_f64_fma_subnormals and the new agc_driver_f64_denorm_preserve_spirv pass (libSceAgc + libSceAgcDriver scope, 375 tests). With the DenormPreserve 64 lines in SpirvModuleSetup.cpp disabled, the new SPIR-V test fails, so the declaration is pinned on every device. The denormBehaviorIndependence == ALL gate and the runtime test now running on any shaderFloat64 device cover both points from the earlier review; merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5482301750 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2977#pullrequestreview-5482301750). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T07:15:30Z. **Review:** APPROVED --- Built and ran this merged onto current `main`: `agc_shader_memory`, `agc_shader_disk_cache`, `agc_driver_f64_fma_subnormals` and the new `agc_driver_f64_denorm_preserve_spirv` pass (libSceAgc + libSceAgcDriver scope, 375 tests). With the `DenormPreserve 64` lines in `SpirvModuleSetup.cpp` disabled, the new SPIR-V test fails, so the declaration is pinned on every device. The `denormBehaviorIndependence == ALL` gate and the runtime test now running on any `shaderFloat64` device cover both points from the earlier review; merging.
Silverash-i8 commented 2026-10-11 13:45:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-11T13:45:24Z.


Confirming what I said I'd check on the Arrow Lake iGPU (Intel driver 101.8991, no shaderFloat64), now on main a11c8f7f with this PR merged: Windows 11, WinLibs GCC 15.2.0 r7, Release, ANYPS5_GPU=Intel, 3 runs each.

  • agc_driver_f64_fma_subnormals skips ("skipped, the device has no shaderFloat64"), as expected.
  • agc_driver_f64_denorm_preserve_spirv passes.

AI-assisted (Claude Code); I ran this on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109673573 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2977#issuecomment-6109673573). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-11T13:45:24Z. --- Confirming what I said I'd check on the Arrow Lake iGPU (Intel driver 101.8991, no `shaderFloat64`), now on `main` a11c8f7f with this PR merged: Windows 11, WinLibs GCC 15.2.0 r7, Release, `ANYPS5_GPU=Intel`, 3 runs each. - `agc_driver_f64_fma_subnormals` skips ("skipped, the device has no shaderFloat64"), as expected. - `agc_driver_f64_denorm_preserve_spirv` passes. AI-assisted (Claude Code); I ran this on my machine.
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!2977
No description provided.