perf(vk): enable native float atomics on Radeon 860M/840M #2084
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2084
Loading…
Reference in a new issue
No description provided.
Delete branch "Jer9/Longshot:perf/vk-860m-compute-mesh-native-fadd"
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?
Summary
On AMD Radeon 860M (Krackan Point
gfx1152, PCI ID1002:1114, Windows Adrenalin26.10.1 LLPC), the default float-add policy leaves performance on the table:Software CAS float-add loop vs. hardware
OpAtomicFAddEXT(gpu/vk/device_policy.h): AddingVK_DRIVER_ID_AMD_PROPRIETARY+device == 0x1114+driverVersion >= 0x8001a0(Adrenalin26.10.1+) topolicy_rule::native_fadd_listed()replaces the 1024-tryOpAtomicCompareExchangeloop in the 6 float-add compute shaders withVK_EXT_shader_atomic_float, saving ~0.38 ms inm dispatchwith zero visual artifacts.Because
0x1114is Krackan Point's shared PCI ID (Radeon 860M / 840M), this change is strictly scoped to tested1002:1114silicon on Windows and does not alter behavior on any other GPU, driver version, or OS.Files to read first:
gpu/vk/device_policy.h,gpu/vk/vk_main.cpp.Testing
Tested: Windows 11 (build 26200), AMD Ryzen AI 7 350 / AMD Radeon 860M (
1002:1114, RDNA 3.5gfx1152, 8 CUs, 32 GB RAM / 6 GB VGM), Adrenalin26.10.1 (LLPC).RX_VK_MESH_SHADERS/RX_VK_NATIVE_FADDoverrides:vk: float atomic add on storage buffers: native (VK_EXT_shader_atomic_float), AMD's Windows driver, Radeon 860M/840M (0x1114) from 0x8001a01600x1000(Game 75%, FSR 3.1 75%, XeSS 2.0.2 75%, Game 100%) and1920x1200, plusRX_VK_PASS_TIMING=1pass breakdowns.1600x1000(RX_VK_SHOT_FX=1,sharpness=80%) Kokiri Forest screenshots: zero milky-white sky/haze, zero geometry or lighting regressions.KokiriForest_Child -> LostWood_Child -> HyruleField_Child, 15,276 frames) with0VK_ERROR_DEVICE_LOSTerrors.check_third_party.py,test_doc_anchors.py,test_utf8_paths.py,test_device_policy.py,test_mesh_mode_switch.py,test_task_mesh_fallback_devices.py,test_native_float_atomic_add.py).Still to test:
RX_VK_MESH_SHADERS=computeandRX_VK_NATIVE_FADD=1, expecting to see whether other AMD chips show a clean FPS/visual win so the defaults can be safely expanded beyond0x1002:0x1114(@Beanstalkplease testRX_VK_MESH_SHADERS=computeandRX_VK_NATIVE_FADD=1on Windows AMD GPUs).Measurements
Previous measurements: The results below include the compute mesh default removed from this PR. They do not establish the performance of the final change on its own.
Setup: Windows 11 26200, AMD Radeon 860M (
1002:1114), Adrenalin26.10.1 (LLPC);KokiriForest_Child,1600x1000docked (handheld_profile=0,ultrawide=0,vsync=2,HOS_FPS_MAX=1000,RX_VK_PRECOMPILE=0,0cold frames). Stage 1 usesRX_VK_PASS_TIMING=1(final clean 600-present block); Stage 2 uses 3-round interleaved 20 s unprofiledRX_VK_FRAME_TRACE=1medians.Isolated Pass-Timing (
RX_VK_PASS_TIMING=1):1600x1000)89c3d21ed9c10742FSR 3.1 75%total spans23.34 ms(other buffers: 100 MB)22.58 ms(other buffers: 242 MB)-0.76 ms,+142 MBVRAMGame 75%total spans19.14 ms(other buffers: 92 MB)18.85 ms(other buffers: 234 MB)-0.29 ms,+142 MBVRAM3-Round Interleaved Unprofiled FPS (
1600x1000, measured with #2085; Game & XeSS do not touch FSR 3.1):main@89c3d21e(Med FPS)Game 75%(dlss=0, FXAA+lin)37.27(26.83 ms)41.91(23.86 ms)+12.4%33.20 -> 34.00(+2.4%)XeSS 75%(dlss=7, XeSS 2.0.2)32.73(30.55 ms)35.54(28.14 ms)+8.6%28.30 -> 29.57(+4.5%)Game 100%(dlss=0,9dc98871)29.30(34.12 ms)30.21(33.10 ms)+3.1%26.13 -> 25.62(Rebased cleanly onto current
forge/main9dd41326; onlyvk_main.cppradv_computeordering andtest_mesh_mode_switch.pywere merged, with no shader/pipeline logic changed.)Risks
0x1002:0x1114on Windows with AMD's proprietary driver anddriverVersion >= 0x8001a0. Zero impact on other GPUs, drivers, or operating systems.mesh_mode=computeallocated+142 MBinother buffers(92 -> 234 MBon Game 75%,100 -> 242 MBon FSR 3.1 75%; ~3.4 GB total of 12.2 GB allowed on a 32 GB laptop). Compute mesh is not enabled by default by this change.1002:1114can force the previous float-add behavior withRX_VK_NATIVE_FADD=0.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (All targeted unit tests pass;test_job_queue.pyskipped on Windows due to shared-consoleCTRL_C_EVENT.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
docs/dev/standards.md, "Hardware tiers").main, measured again or a comment says why the numbers still hold.Tested in game: Windows 11 26200, AMD Radeon 860M (1002:1114, RDNA 3.5 gfx1152), Adrenalin 26.10.1 LLPC: verified auto-policy logs (mesh_mode=compute + VK_EXT_shader_atomic_float), 3-round interleaved A/B at 1600x1000 Kokiri Forest (+12.4% Game 75%, +8.6% XeSS 75%, +3.1% Game 100%), matched RX_VK_SHOT_FX=1 sharpness=80 visual parity (zero haze/clipping), and 242s 3-zone stability tour (KokiriForest_Child -> LostWood_Child -> HyruleField_Child, 15,276 frames, 0 VK_ERROR_DEVICE_LOST).
Possibly related, for context:
@fix
perf(vk): speed up Radeon 860M/840M (+3-12%) with compute mesh and native float atomicsto perf(vk): enable native float atomics on Radeon 860M/840M9c3a8494ff893356016dRecommendation: Approve. The standalone performance gain from the Radeon native float-add default remains unproven. The supplied comparisons also include the removed compute-mesh default and, for the FPS table, #2085. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.
What
@fixchangedI changed this pull request: the new head is
893356016d. I rebased it ontomain(b74bbe688b).Conflicts resolved
Changed
Changed in part (the rest is for the author)
Nothing was built or run: the checks run again on the new head.
The change enables supported native float atomics by default on Windows Radeon 860M/840M devices with AMD’s proprietary driver from version 0x8001a0. It keeps the existing override and removes the proposed compute-mesh default; the standalone performance benefit is not yet established.
Before merging, for the author (1) (a run, a measurement or a decision; it doesn't hold the recommendation)
Checks: they run again on this head; a failure shows on the pull request.
Also noticed (3; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven. The reported 3.1–12.4% FPS gains compare a previous version that also enabled compute mesh, with #2085 included in the FPS runs. No isolated interleaved comparison against the current merge base with frame-time lows is supplied.
Other systems: The AMD rule requires Windows, the proprietary driver, device 0x1114 and the stated driver threshold; extension and feature support are also required. The explicit override remains available on other systems. The supplied game run covers an 860M on Windows, not an 840M.
Switches: RX_VK_NATIVE_FADD changes its automatic default to native on supported Windows AMD 0x1114 devices from driver version 0x8001a0; 0 retains the loop and 1 requests native support. The default’s performance justification still needs an isolated measurement. The switch table describes the new default.
Reviewed:
893356016dagainstb74bbe688b: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the policy and device-creation sections and their callers, the relevant switch entry, and the changed policy and native-float test cases. Skimmed the remaining diff and commit list; the base-to-head diff also contains sibling changes, so not every changed file was read in full. docs/review-checklist.md and the adjacent Tooling AGENTS.md were unavailable.; nothing run (a code review).Checked and fine:
Testing: No code or tests were run. The author reports game, visual and stability checks on an 860M for the previous combined policy; CI has not run on this head.
Overlaps and merge order: The supplied commit list includes #2085 and other merged sibling changes in the base-to-head diff; no merge order can be established from the supplied information.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.