perf(shader): flush f32 denormals in hardware when a startup probe matches the emulation #6503
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6503"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by ThatsLeo on 2026-10-15T17:46:01Z.
What
In
FLOAT_MODEf32 denormal mode 0 the recompiler flushes f32 denormals in software around every flushing instruction: both inputs, and for products the tiny-before-rounding check (flushTinyProduct, a second scaled multiply plus compares and selects). In Stray's 1,751 shader requests this makesv_mul_f32, the most common f32 instruction, about 96 SPIR-V words, against about 19 forv_mad_f32.On a device whose hardware flush gives the same bits, this PR lets the hardware do it. It follows what came out of #4977:
Per-device probe. A device with
shaderDenormFlushToZeroFloat32anddenormBehaviorIndependenceother thanNONErunsProbeFloat32FlushToZerowhen it is created. It recompiles the three programs ofagc_driver_f32_denormal_flush(the mixed module with every flushing instruction in one entry point, as @MarcZX100 asked, and the two tiny-product programs) with no float mode,IEEE_MODEoff andIEEE_MODEon, once with the current emulation and once withDenormFlushToZero 32declared, dispatches each and compares the results bit for bit (NaN with NaN). The reference is the current emulation, so the probe checks the device against the semantics the tests already pin.Only when every result matches,
SpirvTarget::float32FlushToZerois set (it is part of the cache key and of the serialized request, version 33). Every module then declaresDenormFlushToZero 32, and these instructions drop their software flush in the default rounding mode only:v_add_f32,v_sub_f32,v_subrev_f32,v_mul_f32,v_floor_f32,v_ceil_f32;v_fma_f32,v_fmac_f32,v_fmamk_f32andv_fmaak_f32(roundsProductSeparatelyfalse).VOP3P forms (
v_fma_mix_f32), the directed rounding modes and every other instruction (min/max/med3, frexp, legacy forms, compares,v_div_fixup,v_mullit) keep the emulation: the mixed check in #4977 showed differences for them.A device without the mode (NVIDIA per @nikowolf123's tables, lavapipe here) never runs the probe and is unchanged.
APS5_NO_HW_F32_FLUSHskips the probe. The driver prints one[float-controls]line with the outcome and its time. The probe runs before the pipeline journal replay starts, and its pipelines are neither recorded in the journal nor counted inComputePipelinesCreated.Tested
Fedora 44, GCC 16.2.1, Release, Intel Arc (Meteor Lake iGPU, Mesa 26.2.3 ANV) and lavapipe (llvmpipe, LLVM 22.1.8).
[float-controls] f32 denormal flush: hardware (0 of 5472 probe results differ from the emulated flush, 35-50 ms). On lavapipe the device offers no f32 flush mode, so nothing runs.agc_driver_f32_denormal_flushnow runs every check, including the directed rounding modes and the refused denormal modes, once with the emulated flush and, on a device that offers the mode, again with the hardware flush. It also requires the hardware-flush module to declare the mode and to be smaller. Both pass on the Arc.request_serializerandagc_shader_memorycover the new field (round trip, cache key, version 33, version 32 requests read without it, downgraded requests).ctest(1493 tests) onmainfc623324a: the Arc, where the probe enables the hardware flush for the whole suite, and lavapipe both pass all butapplication_heap_lazy(#6107).APS5_TRACE_FRAMES=20:30, no other switch), 3840x2160, warm caches, two captures each, same session. The base ismain0029e62f9with one local change the dump needs (PlayGo answersBAD_CHUNK_IDfor the missingplaygo-*files, as before #5494); the PR commit is the same change on that base. The GPU's minimum frequency was set to 2250 MHz for both (rps_min_freq_mhz).mainThe compute program that dominates the scene (
0x2011300000, 8x8 wave64 at 3840x2160) went from 343 to 307 ms per dispatch in anAPS5_PROFILE_GPU=1run.Traces and
trace_digest.pyoutput: ThatsLeo:evidence/hw-f32-flush (main/andpr/).v_fma_mix_f32) took the f32 instructions' SPIR-V from 61.8M to 41.5M words (-33%):v_mul_f3296 to 38 words,v_add_f3276 to 46,v_sub_f3257 to 37.Related open PRs: zmeizy's series for f32 denormal modes 1 and 2 (#6010 and the others) changes
f32DenormalFlushFortoo; this PR acts only in mode 0. #5782 adds a flush to thev_mad_f32family; the fused-only condition here keeps the non-fused forms emulated whatever it decides.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T18:27:09Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/shader/recompiler/tests/RequestSerializerTests.cppL210, L213-214, L249, L252-253, L274, L397-402, L411, L415-416, L430, L432core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvModuleSetup.cppL341-343core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppL4734, L4852, L5089, L5093, L5099core/shader/recompiler/ControlFlow/src/RequestSerializer.cppL797, L826, L835, L878core/shader/recompiler/tests/RequestSerializerTests.cppL210, L214, L249, L253, L274, L277, L398, L401, L411, L416, L430, L432core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppL4734, L4852, L4943, L4952, L5001-5002, L5010, L5017-5018, L5024-5025, L5031-5032, L5038-5039, L5089, L5093, L5099core/shader/recompiler/ControlFlow/src/RequestSerializer.cppL797, L826, L835, L878core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvModuleSetup.cppL341-343core/shader/recompiler/ControlFlow/src/RequestSerializer.cppL797, L826, L835, L878core/shader/recompiler/Translation/include/Translation/TranslationContext.hppL27core/shader/recompiler/Translation/src/InstructionTranslator.cppL571Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Translation/include/Translation/InstructionTranslator.hppcore/shader/recompiler/Translation/include/Translation/TranslationContext.hppcore/shader/recompiler/Translation/src/InstructionTranslator.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hppcore/shader/recompiler/SpirvBackend/src/SpirvEmitter.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/shader/recompiler/Recompiler.hppdocs/dev/ARCHITECTURE.mdcore/shader/recompiler/Translation/src/VectorInstructions.cppcore/shader/recompiler/Translation/src/VectorInstructions.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/ARCHITECTURE.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hppcore/shader/recompiler/SpirvBackend/src/SpirvEmitter.cppcore/shader/recompiler/tests/RequestSerializerTests.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/tests/RequestSerializerTests.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/ARCHITECTURE.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/shader/recompiler/Recompiler.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hppcore/shader/recompiler/Translation/src/InstructionTranslator.cppcore/shader/recompiler/tests/RequestSerializerTests.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/tests/RequestSerializerTests.cppcore/shader/recompiler/SpirvBackend/src/SpirvEmitter.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hppcore/shader/recompiler/tests/RequestSerializerTests.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/tests/RequestSerializerTests.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ARCHITECTURE.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/Recompiler.cppdocs/dev/ENVIRONMENT.mddocs/dev/ARCHITECTURE.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hppcore/shader/recompiler/SpirvBackend/src/SpirvEmitter.cppcore/shader/recompiler/tests/RequestSerializerTests.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppdocs/dev/ARCHITECTURE.mddocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hppcore/shader/recompiler/SpirvBackend/src/SpirvEmitter.cppdocs/dev/ARCHITECTURE.mddocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hppcore/shader/recompiler/Translation/include/Translation/InstructionTranslator.hppcore/shader/recompiler/Translation/src/InstructionTranslator.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/shader/recompiler/Recompiler.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hppcore/shader/recompiler/SpirvBackend/src/SpirvEmitter.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/shader/recompiler/Recompiler.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hppcore/shader/recompiler/SpirvBackend/src/SpirvEmitter.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hppcore/shader/recompiler/SpirvBackend/src/SpirvEmitter.cppdocs/dev/ARCHITECTURE.mddocs/dev/ENVIRONMENT.mdcore/shader/recompiler/Recompiler.hppImported from boykopovar/AnyPS5. Originally posted by alfalfa-star on 2026-10-15T18:39:48Z.
Tested on AMD RDNA4 with RADV, which the description doesn't cover yet: RX 9070 XT (GFX1201), Mesa 26.2.4, Arch Linux (kernel 7.2.9), GCC Release build of
396372fa4merged ontomain03c4cb5e7.Probe: hardware flush is on here too,
[float-controls] f32 denormal flush: hardware (0 of 5472 probe results differ from the emulated flush, 16-22 ms). RADV reportsshaderDenormFlushToZeroFloat32withdenormBehaviorIndependence32_BIT_ONLY.ctest (1267 tests,
-j4) onmain+ this PR: 1266 pass. The one failure isagc_driver_tessellation(SEGFAULT, the same withAPS5_NO_HW_F32_FLUSH=1; #4683).agc_driver_f32_denormal_flush,request_serializerandagc_shader_memorypass.Kena: Bridge of Spirits (PPSA01802), walking in the forest after loading a save. The base is
main03c4cb5e7plus this PR, and a few local stand-ins Kena needs onmainto get that far: skipped failing draws, null descriptors for unreadable SRT pointers, sampler and V# relaxations. One binary, withAPS5_NO_HW_F32_FLUSH=1for the off side. The shader cache was warm on both sides, 3200x1800 render targets, 125 s runs,APS5_PROFILE_GPU=1. GPU time per call of the programs that run in every frame:0x200bd60000(compute)0x2007260000(compute)0x20099d0000(compute)0x2006f100000x2006f000000x2006fa00000x20094600000x20072b0000Draw time per present depends too much on where the walk is to compare between runs (43-60 ms on, 47-71 ms off in the same intervals). On
mainKena is limited by the CPU side here (frame p50 110-330 ms against 58-94 ms of GPU busy per present inAPS5_TRACE_SECONDS=95:10windows), so the frame rate onmaindoesn't change with this PR. The saving shows once the rest of the frame is faster.In one of seven boots with the hardware flush (none of four without), the title stopped submitting GPU work right after the shader cache loaded. Three further boots with the flush were fine, so I can't tie it to this PR.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by ThatsLeo on 2026-10-15T19:59:41Z.
Thanks @alfalfa-star, that covers the vendor the description was missing: the same 0 of 5472 on RADV, and the Kena compute timings.
About the boot that stopped submitting: the probe only runs while the device is created, and when any result differs it leaves the emulated flush on, so it shouldn't affect anything after the shader cache loads. To rule it out, could you attach that boot's log if you still have it? The
[float-controls]line and the last few hundred lines before the stop would show whether the probe ran normally and where the submissions ended.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by SoRadGaming on 2026-10-16T03:46:41Z.
Probe and frame-rate results on AMD's proprietary Windows driver, which this PR hadn't been tested on yet.
Host: Windows 11 Pro 26200, Radeon RX 9070 XT (amdvlk 32.0.23033.1002, LLPC 26.3.1), Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7, Release.
Probe. The device reports
shaderDenormFlushToZeroFloat32true and independence32_BIT_ONLY. At startup it logs:Frame rate.
-lvl hub_crashsite.main5d9dcc42dwith this PR and several other open PRs (#6188, #6273, #6292, #6505 and others). One binary, toggling onlyAPS5_NO_HW_F32_FLUSH, each mode with its own warm shader cache (1,904 hits, 0 misses).APS5_NO_HW_F32_FLUSH=1That is about +2 %. This scene is limited by queue worker 0 rather than the GPU, so the shader savings show only partly. No errors in the 5 launches with the hardware flush.
AI-assisted (Claude Code); the builds and runs are on my machine.
Imported from boykopovar/AnyPS5. Originally posted by alfalfa-star on 2026-10-16T07:15:11Z.
@ThatsLeo I still had it. Both logs are attached here: the stalled boot in full (418 lines), and the first 500 lines of a good boot with the same binary and environment for comparison.
Probe. It ran normally, once per Vulkan device the build creates, the same as in every other boot:
Where it stopped. It stopped about 10 s into loading, after both probes:
StorageTexture upload submit/done.tile=7) and itstile=3copy (0x2034950000 ... layers=5 dim=2 tile=3).[shader-disk-cache] (10 s): 3267 hits, 0 missesreport.Pad scriptlines until my 125 s timeout killed it (exit 124). On teardown it printed fourstorage image ... destroyed with GPU results pending, including the frame buffer0x8fc0000000.The good boot reaches the same point at line ~395. There it creates a second
tile=3cube copy, does another upload submit / done, and goes on for about 4,100 more lines before its first cache report.No GPU reset in the kernel log, no crash and no skipped draws or dispatches. The run was killed, so I have no thread backtrace. It also never reached the 95 s trace window, so there is no trace. That fits your reading: the stop is well after the probe, and I can't tell from the log what it was waiting on.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-16T14:18:55Z.
Runs on three more devices: RDNA 3 with RADV, NVIDIA on Windows, and Intel on Windows. Head 0ffb5f460, merged onto
main82ddae75b(on Windows also with #6452, which the MinGW test build needs).ctest,main→ this PRhardware (0 of 5472 probe results differ ...), 26–29 ms, in every device creation of the runshaderDenormFlushToZeroFloat32 = false, so the emulated flush stayshardware (0 of 5472 ...)in all 488 device creations of the runagc_driver_f32_denormal_flushpasses on all three.The other failures are not this PR's:
agc_driver_graphics, which fails the same way onmain(#6792; #6789 fixes it).guest_kqueue, which fails only in our elevated SSH session, onmainas well.mainfails the same five image-table and bindless tests as this PR (agc_driver_bindless_images,image_sint8,image_table,image_table_cache_bounds,image_table_reuse), plusguest_kqueue.video_out_hdr_present,patched_libraries,agc_driver_pm4_replay_toolandguest_shader_linkalso failed. The first three pass on rerun.guest_shader_linksometimes hangs on this GPU without this PR too. Run alone 15 times with a 60 s timeout, it timed out 4 times onmainand 6 times with this PR. I read that as the same flake.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-16T14:50:05Z.
A size data point from Crimson Desert (PPSA25286). Its three biggest compute pipelines are the ones that push it past its memory budget while the driver compiles them.
I replayed the title's requests for those three programs with
agc_shader_replay, built frommain82ddae75b+ #6785 + this PR at 0ffb5f460. Each request was replayed twice: once as dumped (float32FlushToZerofalse), and once withfloat32FlushToZeroset on its target by a local, unproposed switch in the replay tool. Everything else in the request was identical.float32FlushToZeroThe emulated sizes match what the title builds in-game today (1,357,369 words for A).
On this machine (RTX 4070 Ti, NVIDIA 595.99.02, Ubuntu 24.04) the Linux driver also reports
shaderDenormFlushToZeroFloat32 = false, as johnmaia saw on Windows. So the hardware path does not apply here, and I could not comparevkCreateComputePipelinestime or memory for the smaller modules. With the emulated flush, NVIDIA takes 18.5 s / 1.37 GB, 90 s / 4.1 GB and 101 s / 4.5 GB for A, B and C.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by odntht on 2026-10-16T19:59:53Z.
Another row for the probe table: Gen9 on Linux.
Setup: Intel HD Graphics 520 (Skylake GT2, Gen9), Mesa 25.2.8 ANV, Ubuntu 24.04 (container), kernel 6.12.111, GCC 13.3, Release. Head
0ffb5f460merged ontomain82ddae75b(clean; it conflicts with the currentmainf474fb776).ANYPS5_GPU="HD Graphics 520"; the log shows it selected.[float-controls] f32 denormal flush: hardware (0 of 5472 probe results differ from the emulated flush, ...)in every process. It takes 296 ms on the first, cold run and 69 to 85 ms after that (12 processes), against 35 to 50 ms on the Arc in the description.agc_driver_f32_denormal_flush,agc_driver_f16_denormal_flush,agc_driver_ldexp_f32_denormal,agc_driver_vcmp_f32_denormals,agc_denormal_flush_elimination,agc_shader_memoryandrequest_serializerpass 3 of 3.AI-assisted: yes (Claude Code). The runs are on my machine.
Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-17T02:24:05Z.
Follow-up on the
guest_shader_linktimeouts on the Intel UHD 770 in my run above: they were the test process hanging at exit, which #6986 fixes. With #6986 onmainf643e61d9it passed 15 of 15, against 4 of 15 timed out onmainwithout it. Nothing there is down to this PR.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-17T12:19:23Z.
Rebase handoff, with a serializer version collision resolved —
mainand this PR each added one shader-target bool after the same tail, both gated at serialization version 32 in their own trees. The merged serializer keepsspannedWavesat v32 and movesfloat32FlushToZeroto a new v33 (writer, reader bound, and the version/future assertions in the tests all follow); the test fixtures' expected tails are rebuilt for the merged layout (one shared header plus both bools).Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON, AMD RX 9070 XT / RADV):tools/check_conventions.py --base origin/mainpasses;request_serializerpasses with the new versioningagc_shader_memoryfails its layout-pair reuse check ("the second layout ignored the reuse switch") on the merged branch — I could not attribute it cleanly because your own head does not build against currentmain(itsPipelineJournalsize pins are stale), so there is no clean control; the serializer tests and everything else pass apart from the knownmainregression (agc_driver_tessellationsegfault, #4727)To pick it up:
Head is
1d180c293(amended: the serializer v33 fix and the test updates were folded in after the first push).Imported from boykopovar/AnyPS5. Originally posted by ThatsLeo on 2026-10-17T13:56:17Z.
Rebased onto
main47a266cf9(c850cb9ae), with the same resolution as @blawesom's handoff:spannedWavesstays at version 32 andfloat32FlushToZeromoves to version 33.request_serializernow also checks that a version 32 request reads back without the flag. Thanks for preparing it.agc_shader_memorypasses on the rebased head, on the Arc and on lavapipe, so the layout-pair reuse failure is specific to that merge. The full suite:application_heap_lazy(#6107) andagc_driver_sample_multisample_target, which fails the same way onmain(no multisampled storage images on the Arc).application_heap_lazy.Thanks also @odntht for the Gen9 row and @johnmaia for tracking the
guest_shader_linktimeouts to #6986. The probe has now matched the emulated flush on Intel Gen9, Gen12 and Arc (ANV and Windows), RDNA 3 and RDNA 4 (RADV), and AMD's Windows driver. On NVIDIA the drivers don't offer the f32 flush, so it stays emulated there.AI-assisted: yes