s_memtime goes backwards on AMD's Windows driver too: #1383's narrow-clock check only matches RADV #1615
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 LeandroLP23 on 2026-10-08T14:56:57Z.
#1383 reads
s_memtimefrom the device clock when the subgroup clock is 20 bits, butNarrowSubgroupClockonly returns true forVK_DRIVER_ID_MESA_RADVwith a(RADV <family>)device name. AMD's own Windows driver on an RDNA 3.5 GPU wraps the same way, but it isn't RADV and its device name carries no family, so it keeps the subgroup clock.Radeon 860M (Krackan, device 0x1114), Windows driver 32.0.13058.8001, Windows 11, MinGW-w64 GCC 15.2.0, Release,
main9f4bd71c. The log showsShader clock driver=1 narrowSubgroupClock=0.agc_driver_shader_clockmainmemtime: lane 0 went back from 1030876 to 1354main,NarrowSubgroupClockalso true forVK_DRIVER_ID_AMD_PROPRIETARY1030876 is just under 2^20. The step back plus the wrap is 19,054 cycles, about the length of the test's 2000-step loop, so this is the 20-bit wrap from #985, not a random read.
The device name carries no family, so the check needs something other than the name for this driver:
VK_DRIVER_ID_AMD_PROPRIETARYdevice as narrow. This is one line, but it also moves GFX10.1 and GFX12 GPUs to the 100 MHz device clock. I can't check whether their subgroup clock is 64 bits on this driver.Which one would you take? I can send the PR and test it on this GPU.
Found with AI assistance (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-08T16:37:07Z.
A data point for option 2's lower bound, from #985.
On RADV, a GFX10.3 part (Ryzen 5 7600X iGPU, RAPHAEL_MENDOCINO, gfx1036, Mesa 26.2.1) wraps the same way. On
mainbefore #1383,agc_driver_shader_clockfailed on runs 7 and 14 of--repeat until-failwithmemtime: lane 0 went back from 1043594 to 53661. 1043594 is just under 2^20. With #1383, 300 of 300 pass, and the log readsShader clock driver=3 narrowSubgroupClock=1.So GFX10.3 belongs in the narrow range for the hardware, whichever driver is used. I have no GFX10.1 or GFX12 device, so I can't check option 1's edges.
Imported from boykopovar/AnyPS5. Originally posted by joelfernandes23 on 2026-10-09T13:02:16Z.
I can also reproduce this clock-wrap signature on an RX 7900 XT (RDNA 3) with AMD's Windows driver.
Environment: Windows 11 Pro 10.0.26200, Ryzen 7 7700X, 32 GB RAM, Radeon RX 7900 XT device 0x744c, driver 32.0.31041.1004, Vulkan 1.4.349. WinLibs MinGW-w64 GCC 15.2.0 UCRT/POSIX/SEH r7, Release, BUILD_TESTING=ON, SPIRV-Tools validation OFF. ANYPS5_GPU=7900 XT and ANYPS5_REQUIRE_VULKAN=1.
On unchanged main
d70b89989473ba1f6ae13e44e079e67f1f8a44b0:The initial smoke test and main full suite passed
agc_driver_shader_clock; a later focused run failed, so it is intermittent. While separately validating #1473, the clock test also failed in its full run and after nine successful repetitions. Restoring and rebuilding unchanged main reproduced it independently of #1473.Command for the focused check:
I subsequently extended PR #1632's device-ID detection to measured ID 0x744c, using its existing device-clock fallback. The GPU clock test passed 100/100 consecutive runs and the verbose log reports
narrowSubgroupClock=1. Full CTest with that extension: 505 passed, 1 failed, 1 skipped; the remaining failure is the separate comparison issue #825. A regression fails without the new ID and passes with it. The reference-clock timing approximation is documented; no title timing or other 0x744c boards were tested. I can share the small extension patch with #1632's author.