AMD Windows GPL-off: the f32 flush startup probe (#6503) page-faults at 0xbeefdeadbeef, so every APS5_NO_GPL test loses its device #7809
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 savvaniss on 2026-10-19T08:25:48Z.
What happens
Since #6503 (
ac14d6317, merged 10-19),VulkanDevicerunsProbeFloat32FlushToZerowhile it opens. On an RX 9070 XT, when graphics pipeline libraries are off, the probe's dispatch page-faults and the device is lost before the test starts. All three AMD tests that setAPS5_NO_GPL=1and open a device do this every run:agc_driver_draw_cache_reuse_off,agc_driver_stencil_replay_no_gplandagc_driver_layered_volume_vertex_no_gpl. They return 77, so ctest reports them as skipped, not failed.The faulting page is
0xbeefdeadbeef. That is a buffer base built from two words of the probe'sOutput.fill(0xdeadbeefu): base_lo0xdeadbeef, plus0xdeadbeef & 0xffffas base_hi. In the GPL-off case the shader seems to read a descriptor from the output buffer rather than from the user data. With libraries off,Target()setsfixedPushSlotsandregistrationModulesto false, so the user-data path differs from the GPL path.Why it matters on Windows
Each fault is a TDR (WER
LiveKernelEvent 141). Tests that open a device during the reset hit the probe too. They fail withvkCreateComputePipelines color transfer: Vulkan result -4(read invalid at 0x0) and skip after 10 to 24 s. That is why full AMD runs on main now show groups of 3 or 4 slow skipped tests.On this machine the AMD driver recovered from most of these resets. Twice it did not. Each time the GPU stayed at 100 %, both screens went black, and the PC needed a hard reset (Kernel-Power 41, no Event 4101). Both freezes happened during full
ctest --parallel 4runs, on7f596df48and on6b8228b2b.Evidence
07377573f(before #6503)7f596df48and6b8228b2bpipelineLibrary=0tests log[float-controls] f32 denormal flush: hardwareand passf32 denormal flush: hardware (0 of 5472 ...)The AMD driver version and Windows build are the same in the good and bad runs.
Workaround
APS5_NO_HW_F32_FLUSH=1skips the probe (float32FlushToZeroCandidateis false). Leaving out_no_gpl|draw_cache_reuse_offalso avoids the faults.Related: #5150 (another AMD Windows GPL-off device loss).
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T08:45:37Z.
I traced the GPL-dependent fields through current main.
ProbeFloat32FlushToZerocallsShaderRecompiler::Recompiledirectly for compute shaders and thenVulkanDevice::Dispatch;fixedPushSlotsandregistrationModulesare only consumed by the graphicsShaderRegistrypath.computePipelineFlags()also does not vary withgraphicsPipelineLibrary. So the0xbeefdeadbeefaddress is strong evidence of a bad descriptor/user-data value, but the proposed GPL-off target flags do not by themselves explain it in this probe path.Could you identify the first of the six
Runcombinations that faults (mode andMixedCode/TinyCode/MixedTinyCode), and capture that shader's SPIR-V plus its recompile binding/push-constant layout on the failing AMD setup? Comparing that with the GPL-on run should distinguish a shader ABI/layout mismatch from an AMD compute-pipeline driver issue before changing the startup probe.Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-19T09:13:27Z.
Found the root cause, and it isn't the probe's code. The probe only made it visible.
The AMD Windows driver keeps one on-disk pipeline cache (
%LOCALAPPDATA%\AMD\VkCache) for devices with and without the pipeline-library extensions, andAPS5_NO_GPL=1opened a device without them. A compute pipeline compiled by one kind of device and loaded by the other runs with the wrong descriptor layout. Its first dispatch writes nothing, so the probe's output keeps its0xdeadbeeffill. The next dispatch reads a buffer descriptor from that output and faults at0xbeefdeadbeef.With
agc_driver_draw_cache_reuse_testson the RX 9070 XT, starting from an empty AMD driver cache:On its own with a warm cache, the
APS5_NO_GPLtest passes, 4 times out of 4.Fix in #7828: the device keeps the extensions and their features enabled, and
APS5_NO_GPLonly stops using them. Both sequences above then pass. The full AMD suite (--parallel 4, empty driver cache) runs without a singledevice-faultor stalled test.Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-19T12:02:00Z.
@MarcZX10 thanks, your trace was right: the target flags never reach the probe. I dumped what the probe recompiles on the RX 9070 XT before any dispatch, with and without
APS5_NO_GPL. For all 18 runs, the SPIR-V, push constants, bindings and specialization constants are byte-identical between the two. The device differs only in its extension set, and the AMD driver's shared on-disk pipeline cache serves a pipeline compiled on one kind of device to the other (the sequences in my comment above). #7828 keeps the extension set the same.AI-assisted: yes (Claude Code)