perf(vk): add floats to storage buffers with the GPU's own atomic, not a compare-and-swap loop #2306
Closed
mooki000 wants to merge 3 commits from
mooki000/atomic-float-add into main
pull from: mooki000/atomic-float-add
merge into: MagicBeanDev:main
MagicBeanDev:main
MagicBeanDev:github/pr/2893
MagicBeanDev:github/pr/2890
MagicBeanDev:github/pr/2887
MagicBeanDev:github/pr/2878
MagicBeanDev:github/pr/2875
MagicBeanDev:github/pr/2874
MagicBeanDev:github/pr/2873
MagicBeanDev:github/pr/2871
MagicBeanDev:github/pr/2756
MagicBeanDev:github/pr/2897
MagicBeanDev:github/pr/2896
MagicBeanDev:github/pr/2718
MagicBeanDev:github/pr/2842
MagicBeanDev:github/pr/2691
MagicBeanDev:github/pr/2895
MagicBeanDev:github/pr/2743
MagicBeanDev:github/pr/2765
MagicBeanDev:github/pr/2708
MagicBeanDev:github/pr/2732
MagicBeanDev:github/pr/2755
MagicBeanDev:github/pr/2817
MagicBeanDev:github/pr/2876
MagicBeanDev:release-please--branches--main
MagicBeanDev:release-please--branches--main--release-notes
MagicBeanDev:github/pr/2778
MagicBeanDev:github/pr/2888
MagicBeanDev:github/pr/2866
MagicBeanDev:github/pr/2877
MagicBeanDev:github/pr/2800
MagicBeanDev:github/pr/2829
MagicBeanDev:github/pr/2850
MagicBeanDev:github/pr/2889
MagicBeanDev:github/pr/2882
MagicBeanDev:github/pr/2860
MagicBeanDev:github/pr/2849
MagicBeanDev:github/pr/2886
MagicBeanDev:github/pr/2794
MagicBeanDev:github/pr/2840
MagicBeanDev:github/pr/2830
MagicBeanDev:github/pr/2834
MagicBeanDev:github/pr/2719
MagicBeanDev:github/pr/2742
MagicBeanDev:github/pr/2741
MagicBeanDev:github/pr/2820
MagicBeanDev:github/pr/2771
MagicBeanDev:github/pr/2859
MagicBeanDev:github/pr/2858
MagicBeanDev:github/pr/2823
MagicBeanDev:github/pr/2757
MagicBeanDev:github/pr/2769
MagicBeanDev:github/pr/2844
MagicBeanDev:github/pr/2843
MagicBeanDev:github/pr/2673
MagicBeanDev:github/pr/2855
MagicBeanDev:github/pr/2739
MagicBeanDev:github/pr/2807
MagicBeanDev:github/pr/2851
MagicBeanDev:github/pr/2789
MagicBeanDev:github/pr/2814
MagicBeanDev:github/pr/2818
MagicBeanDev:github/pr/2774
MagicBeanDev:github/pr/2772
MagicBeanDev:github/pr/2750
MagicBeanDev:github/pr/2786
MagicBeanDev:github/pr/2785
MagicBeanDev:github/pr/2782
MagicBeanDev:github/pr/2779
MagicBeanDev:github/pr/2775
MagicBeanDev:github/pr/2706
MagicBeanDev:github/pr/2766
MagicBeanDev:github/pr/2747
MagicBeanDev:github/pr/2759
MagicBeanDev:github/pr/2745
MagicBeanDev:github/pr/2740
MagicBeanDev:github/pr/2733
MagicBeanDev:github/pr/2725
MagicBeanDev:github/pr/2727
MagicBeanDev:github/pr/2728
MagicBeanDev:github/pr/2729
MagicBeanDev:github/pr/2721
MagicBeanDev:github/pr/2722
MagicBeanDev:github/pr/2715
MagicBeanDev:github/pr/2714
MagicBeanDev:github/pr/2707
MagicBeanDev:github/pr/2703
MagicBeanDev:github/pr/2705
MagicBeanDev:github/pr/2697
MagicBeanDev:github/pr/2679
MagicBeanDev:github/pr/2676
MagicBeanDev:github/pr/2669
MagicBeanDev:docs/what-hookshot-connects-to
MagicBeanDev:fix/hdr-encode-test
MagicBeanDev:fix/main-tests
MagicBeanDev:fix/play-cache-files
MagicBeanDev:perf/game-barrier-order
MagicBeanDev:feat/heap-lazy
MagicBeanDev:feat/texture-detail
MagicBeanDev:perf/astc-opaque-bc1
MagicBeanDev:fix/fs-dir-lock
MagicBeanDev:fix/framegen-native-kept
MagicBeanDev:fix/update-no-downgrade
MagicBeanDev:port/k10-gcn-f16-mirrors
MagicBeanDev:fix/framegen-mult-cap
MagicBeanDev:chore/release-as-2.1.1
MagicBeanDev:perf/pcache-load-switch
MagicBeanDev:fix/prepare-progress-log
MagicBeanDev:fix/update-closes-stale-game
MagicBeanDev:fix/hdr-scaled-sampled
MagicBeanDev:perf/first-start-preset
MagicBeanDev:perf/zero-upload
MagicBeanDev:fix/vcore-escape-2s
MagicBeanDev:test/fake-gh-atomic
MagicBeanDev:perf/batch-idle-flush
MagicBeanDev:test/finish-stub-a
MagicBeanDev:chore/record-2.1.0
MagicBeanDev:fix/main-red-tests
MagicBeanDev:fix/test-display-startup-driver-cache
MagicBeanDev:feat/mesh-shader-mode
MagicBeanDev:fix/menu-probes-at-startup
MagicBeanDev:fix/fps-counter-classic
MagicBeanDev:fix/test-log-batch-flake
MagicBeanDev:fix/narrow-screen-hud
MagicBeanDev:ci/prereleases
MagicBeanDev:release/v2.0.15
MagicBeanDev:hotfix/v2.0.15
MagicBeanDev:fix/present-ahead-replay
MagicBeanDev:release/v2.0.13
MagicBeanDev:fix/bracket-paths-2013
MagicBeanDev:fix/hdr-overlays-2013
MagicBeanDev:fix/fps-counter-scale-2013
MagicBeanDev:fix/stick-seen-at-rest
MagicBeanDev:hotfix/menu-fits-screen
MagicBeanDev:fix/f1-always-opens-menu
MagicBeanDev:fix/ini-keep-lines
MagicBeanDev:claude/cranky-pike-7cf247
MagicBeanDev:perf/texture-answer-flat
MagicBeanDev:fix/stamp-test-modules
MagicBeanDev:fix/appimage-fonts
MagicBeanDev:fix/display-awake
MagicBeanDev:release/v2.0.12
MagicBeanDev:fix/discord-windows
MagicBeanDev:rc/v2.0.12-tests
MagicBeanDev:fix/dlss-keep-feature
MagicBeanDev:rc/v2.0.12
MagicBeanDev:button-icons
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
autorelease: pending
autorelease: tagged
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
github_actions
Pull requests that update GitHub Actions code
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
question
Further information is requested
testing wanted
wontfix
This will not be worked on
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!2306
Loading…
Reference in a new issue
No description provided.
Delete branch "mooki000/atomic-float-add"
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?
Compute programs that run every frame in Kakariko and on Death Mountain Trail add floats to storage buffers, and the translator makes each of those adds a compare-and-swap loop: on an RTX 4090 the busiest one takes 77-80 attempts per add on average, and with the GPU's own float add the frame's GPU time is 0.4-0.6 ms (about 7%) lower there. On NVIDIA's driver the add is now one instruction. On AMD and Intel it stays the loop by default, because the native add was tried in the game only on that RTX 4090. That default changes once someone posts a run on an RDNA 3/4 (or Arc) card in Kakariko and on Death Mountain Trail with
RX_VK_NATIVE_FADD=1.Refs #2336 (closed by the maintainer: tracked in this pull request).
This takes up the idea of yassine-milal's #886 (closed to keep the queue clear), written again on current
mainwith three faults of that diff fixed; no code was copied from it.What changed
vk_main.cpp: on NVIDIA's driver (VkPhysicalDeviceDriverProperties'driverID, asked before the extensions are chosen; NVK does not count), the device asks forVK_EXT_shader_atomic_floatand turns on onlyshaderBufferFloat32AtomicAdd, the one feature used.RX_VK_NATIVE_FADD=1asks for it on any GPU that reports the feature, and=0keeps the loop everywhere without enabling the extension. The switch follows #2042's rule, soon,yesortruemean on and0,false,off,noor empty mean off (native_fadd_wanted). The log names the choice and why:vk: float atomic add on storage buffers: native (VK_EXT_shader_atomic_float), NVIDIA's driver, orcompare-exchange loop, by default only with NVIDIA's driver (RX_VK_NATIVE_FADD=1: native where the GPU has it), orcompare-exchange loop, RX_VK_NATIVE_FADD=0, or the feature that is missing.vk_shader.cpp: the profile tells the translator; the program cache's stamp includes the answer, so ahookshot_programs.binmade with the native add is never read on a GPU without it (#886 keyed only the environment switch).RED/ATOM.ADD.F32on a storage buffer is oneOpAtomicFAddEXTon an f32 view of the buffer, and no loop is made. The global-address fallback (#598) adds natively too, through the f32 views and the page table; the f32 views are searched with their bound length, as the u32 ones are (#886 skipped that check for them). Sirit gainsOpAtomicFAddEXT.docs/development.md: theRX_VK_NATIVE_FADD=0or1row, with the default.Which GPUs report the feature, from the drivers' sources: NVIDIA (the RTX 4090 here reports
shaderBufferFloat32AtomicAdd = true); AMD RDNA 3 and later on Mesa RADV (gfx_level >= GFX11) and RDNA 3 on AMD's own driver (PAL's Gfx11); Intel Arc and later on Mesa ANV (has_lsc). RDNA 1 and 2 (RX 5000, RX 6000, Steam Deck) and Intel's older integrated graphics have the extension without this feature and keep the loop either way. Of these, only NVIDIA's driver gets the native add by default. The AMD and Intel ones needRX_VK_NATIVE_FADD=1until they have a run here (Joey-Magnus's review).How it was tested
tests/test_native_float_atomic_add.py: cuts the storage-buffer setup and the float-add emitter out of the back end into a Sirit fixture, translates a compute shader with the feature, without it and without descriptor aliasing, and checks oneOpAtomicFAddEXTand no compare-and-swap in the first, the loop in the others,spirv-val --target-env vulkan1.3on all three; and that the device, the profile, the cache stamp and the fallback follow. It also compilesnative_fadd_wantedalone against 28 cases: unset, NVIDIA's driver alone gets the native add (not RADV, AMD's, Intel's or NVK); set, the switch's value by #2042's rule on any driver. It fails onmain. The decision fails it whennative_fadd_wantedreads the switch withatoias before (RX_VK_NATIVE_FADD=[on]: the loop) or wants the native add on every driver ([(unset)], driver 1: native).On the head (rebased onto
maina5b955fb), throughtests/run_all.py --strictwithCXX=g++and withCXX=clang++:test_native_float_atomic_add,test_amd_subgroup_profiles,test_program_stamp_knobs,test_env_on,test_global_atomic_add_f32andtest_cas_loop_ceilingpass (6 of 6 each). Againstmain's source,test_native_float_atomic_addfails with both compilers.python -I -B tests/run_all.pyon the head (Arch Linux, 32 at once, at a load of 60 to 140 from other work on this PC): 435 passed, 3 failed, 20 skipped;maina5b955fbthe same way: 436 passed, 1 failed, 20 skipped. The four checks that failed in one of the two runs (test_appimage_package_retry,test_bake_mimo, andtest_recorder_syncandtest_controlby timeout) were run again alone on both trees: all four pass on the branch, andtest_appimage_package_retryfails onmainagain. So they are timing under load, not this change.clang++ -Wall -Wextraon the changed files againstmain: no new warning besides fourmissing field 'pNext' initializeron new structs (two for the driver query, two forafloat), the formvk_main.cppalready has 37 of.A stress program with the translator's exact loop: invocations each add 1.0 to one float; lost adds are the count minus the sum (median of 5 runs).
OpAtomicFAddEXT, adds lost(RTX 4090: NVIDIA 615.78.08; Intel UHD 770: Mesa 26.2.5, which has no buffer float add, so only the loop.) Up to 1,024 adds on one float the loop loses nothing; beyond that it does.
In the game
RTX 4090, NVIDIA 615.78.08, Arch Linux, no window (scripted input), the game's default output 2048x1152, Resolution 100%, Game speed per frame; this branch's build, with and without
RX_VK_NATIVE_FADD=0, each prepared first; a save loaded and Link left standing; 150 s each, numbers from present 1800 on (the 60 fps cap holds both ways, so this is GPU time, not frame rate). These were measured on the first version of this branch, onmainfab8cb3. On NVIDIA's driver the review's changes leave the same native path as the default, so they were not repeated. The two runs after the rebase are below the table.vk: GPU time, every 120 presents: median, range)RX_VK_PASS_TIMING=2, mean of 12 reports of 600 presents)ab7699ee7f536755's dispatch, once a frame435a0138b9013040's dispatch, once a frameThe other four float-add dispatches (below) are cheaper: not among the 25 costliest spans either way, except
592079442d7129daonce with the loop on Death Mountain Trail (0.059 ms).Which programs add floats, and how hard their loops work (a local counting build, not part of this change, run with the loop for about five minutes in each place): six compute programs, all adding to storage buffers:
499dbfd0721d2858(#816's sky light),ab7699ee7f536755(#886's Kakariko pass),435a0138b9013040,592079442d7129da,aba5e6af8d4683eb(Kakariko only) and6214a97bec4cc0bf. Of 111.7 million adds in the two places, none reached the 1,024-attempt ceiling; the busiest,ab7699ee7f536755(about 3,000 adds a frame), took 77-80 attempts an add on average and 704 at most. So on this card no add is lost, and the gain is time. #886's fog program7984161db3e053b5runs every frame in both places but has no 32-bit float add; this change does not touch it.Pictures of the same present both ways (native, loop, difference x4) show the same light, haze and sky; the differences are animation (grass, Navi, Link's idle pose), as a present number is not exactly the same game frame in two runs.
After the review and the rebase: two headless runs of the rebased build (head 7219b3fd on
maina5b955fb, the same save in Kakariko, 360 s each,RX_VK_PRECOMPILE=0so programs were made as met). Both reached Kakariko and ran to the end with no fatal error, no device loss and no kernel driver message. Their pictures show the same light and sky both ways. Other work kept this PC at a load of 60 to 165, so they say nothing about speed. The log line of each:Rebased once more on 2026-11-11, onto
main9df055f2, as50579bab: the only conflict was this change's row indocs/development.mdbeside a new row of main's; the three commits' code and tests are unchanged (compared hunk by hunk). Rerun on that head:test_native_float_atomic_add,test_amd_subgroup_profiles,test_global_atomic_add_f32,test_cas_loop_ceilingand the program cache's four checks pass throughtests/run_all.py --strict, andtest_native_float_atomic_add.pyfails onmain's tree. The whole suite and the two game runs above are from7219b3fdona5b955fb.Not tested
RX_VK_NATIVE_FADD=1it has not been run on either (which of them report the feature is from the drivers' sources above). Windows with NVIDIA is now tested by @nullifyshot (RTX 5080, NVIDIA 621.14, Windows 11, headless): child, Kakariko and Death Mountain Trail and adult, Death Mountain Trail; the default picks the native add there too, about 4 % less GPU time. The team's test request T-54W3 asks for an AMD RX 7000 or newer or an Intel Arc. Still not tested: adult at night on Windows; NVK; the Steam Deck (keeps the loop either way). Frame rates: the RTX 4090 holds the 60 fps cap both ways here, so only GPU time was compared. #886's thin fog and 20-53 ms passes (Quadro P4000, Windows, v2.0.2) did not reproduce on this card: no add was dropped and the pictures match.Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 [email protected]
The change itself looks right to me, and the description is unusually thorough. What I checked in the source:
shaderBufferFloat32AtomicAddis enabled after the query, and the features struct is reset with itspNextkept (gpu/vk/vk_main.cpp:383-394).RX_VK_NATIVE_FADD=0keeps the extension off entirely.native_f32_addis decided inDefineStorageBuffers, before its early return (spirv_emit_context.cpp:1827-1834). The constructor callsDefineStorageBuffers(line 585) beforeDefineGlobalMemoryFunctions(line 592), so the global fallback sees the same answer.f32_add_casis only skipped when native, and its only user isEmitStorageAtomicAddF32, which takes the native branch first.gp_level >= 3, as before.I ran
test_native_float_atomic_add,test_global_atomic_add_f32,test_cas_loop_ceiling,test_amd_subgroup_profilesand theprogram_cachechecks at the PR's head with--strict(spirv-val present), and all pass. On GitHub only the title check has run so far; the SPIR-V fixtures job will run the new test once a maintainer approves the workflows.should fix (testing): by your own reading of the drivers, the native path turns on by default for AMD RDNA 3 and later, on RADV and on AMD's Windows driver. Those are RX 7000 and RX 9000, which
docs/workflow.mdputs in Tier 1 ("test here before merge"). It also turns on for Intel Arc (Tier 2). The only in-game runs are on an RTX 4090. The gain is about 0.5 ms of GPU time at a 60 fps cap, a polish-level win. A driver bug in float atomics on AMD, by contrast, would be a Tier 1 regression in the very compute passes (sky light, Kakariko) that are hard to tell apart visually. Please get one run on an RDNA 3/4 card (Linux RADV, ideally Windows too) in Kakariko and on Death Mountain Trail, with the log line and a picture, before this merges. #2202 shows there are RX 7900 XT testers around. If that can't happen soon, a smaller step is to enable it by default only on NVIDIA's driver for now (dev.props.vendorID/driverID) and widen it once AMD has a row in tested configurations.minor: the branch conflicts with main in
docs/tested-configurations.md, where both changes add rows at the top of the table. A rebase is enough. Keep your rows under any newer ones, since the table is newest first.The code is right: the feature is enabled only when queried and is in the stamp, and
test_amd_subgroup_profiles,test_global_atomic_add_f32andtest_cas_loop_ceilingpass. Remaining:docs/tested-configurations.md.RX_VK_NATIVE_FADDusesatoi, so=onturns it off. Useenv_value_off.tests/test_amd_subgroup_profiles.pyconflicts with #2343, where both add adevfield. Keep both.This now conflicts with main in
docs/development.md,docs/tested-configurations.md,tests/test_amd_subgroup_profiles.py. Could you merge main into the branch (or rebase) when you get a chance? I'll take another look once it's up to date.Thanks for both reviews, and for running the fixtures with
--strict. I took the smaller step, since I have no AMD card here:50579bab): withRX_VK_NATIVE_FADDunset, the native add is asked for only on NVIDIA's driver (VkPhysicalDeviceDriverProperties'driverID, read before the extensions are chosen, so on AMD, Intel and NVK the extension is not even enabled and nothing changes frommain).RX_VK_NATIVE_FADD=1asks for it on any GPU that reportsshaderBufferFloat32AtomicAdd,=0keeps the loop everywhere. The log line names the choice and why, and the program cache's stamp holds the answer as before. I'll widen the default once someone posts an RDNA 3/4 (or Arc) run in Kakariko and on Death Mountain Trail withRX_VK_NATIVE_FADD=1.atoi(48654c61): the switch is read withenv_value_offnow, so=onasks for the native add and0,false,off,noor empty keep the loop.test_native_float_atomic_add.pycompiles the decision alone against 28 cases (values by drivers).a63d57e9, the first commit rebased): rebased ontomain, firsta5b955fband then9df055f2(the second time only this change's row indocs/development.mdconflicted). Our rows indocs/tested-configurations.mdare under the newer ones, andtest_amd_subgroup_profiles.pykeeps bothdevfields (#2343'svk12andfloat_atomic_add). #2323 renameddisk_stamptotranslator_stamp, so the test's stamp check follows that name and checks thatprogram_cache_stampstill uses it.Rerun on the new head: the branch's tests pass with g++ and clang++ under
run_all.py --strict, andtest_native_float_atomic_add.pystill fails againstmain's source; in the whole oftests/run_all.py, the branch fails only checks that also fail onmainunder this PC's load (run again alone, they all pass on the branch). Two headless runs of the rebased build in Kakariko on the RTX 4090 both reached the village without a fault. The default one loggednative (VK_EXT_shader_atomic_float), NVIDIA's driverand the one withRX_VK_NATIVE_FADD=0loggedcompare-exchange loop, RX_VK_NATIVE_FADD=0. The GPU-time numbers in the description are still from the first version; they were not measured again.The whole suite and the two game runs were made on the first rebase (7219b3fd on
a5b955fb); on the head that is pushed,50579bab, I reran the branch's tests and the program cache's checks, and the three commits' code is unchanged from that rebase.Tested on Windows, which the description lists as not tested: RTX 5080 16 GB, NVIDIA 621.14, Windows 11 (build 26300), Ryzen 9 9900X3D. A build of this branch (
50579bab) rebased locally onto main87991bc(no conflicts), headless, the game's default output 2048x1152, Resolution 100%, the 60 fps cap with normal pacing; a save loaded, then teleported and Link left standing, 150 s in each place,vk: GPU timeevery 120 presents (median, range):RX_VK_NATIVE_FADD=0vk: float atomic add on storage buffers: native (VK_EXT_shader_atomic_float), NVIDIA's driverwith the switch unset, andcompare-exchange loop, RX_VK_NATIVE_FADD=0with it, so the NVIDIA-only default picks the native add on Windows' driver too.tests/test_amd_subgroup_profiles.pypasses here (llvm-mingw);tests/test_native_float_atomic_add.pyskips on this PC (no spirv-val).RX_VK_PASS_TIMING=2; one pair of runs each.Let's get someone to test on AMD please
@hckrman101 yes. This PC cannot do it (an RTX 4090, and an Intel UHD 770 whose Mesa has no buffer float add), so here is what an AMD run needs, for whoever has the card.
What this pull request does on AMD today: nothing by default. The native add is chosen only with NVIDIA's driver; on any other GPU the loop stays and the log says
vk: float atomic add on storage buffers: compare-exchange loop, by default only with NVIDIA's driver (RX_VK_NATIVE_FADD=1: native where the GPU has it). So an AMD run answers one question: can the default include AMD.Which cards: RDNA 3 or RDNA 4 (RX 7000 / 9000). RDNA 1 and 2 do not report
shaderBufferFloat32AtomicAdd(from the drivers' sources, in the description), so thereRX_VK_NATIVE_FADD=1stays on the loop and says so.The run (a build of this branch, or of main with it merged):
RX_VK_NATIVE_FADD=1.hookshot_log.txt: thevk: float atomic add on storage buffers: …line (with the switch it should readnative (VK_EXT_shader_atomic_float), RX_VK_NATIVE_FADD=1), and thevk: GPU time … ms a framelines after the first 30 s (one every 120 presents; their median is enough).What decides it: the same picture and equal or less GPU time with the switch, and no
device lostin the log, on Windows' driver and on Mesa RADV if both can be had; then the default can take AMD in a follow-up commit here. A wrong picture or a lost device, and it stays NVIDIA-only, which is what this pull request ships either way.Adult numbers, as promised: RTX 5080, Windows 11. Same build as before but rebased locally onto main
c544828(no conflicts), headless, the 60 fps cap with normal pacing. Loaded the save on Death Mountain Trail, switched to adult Link with the bridge's newage adultcommand (#2694), let it settle 10 s, then left Link standing 150 s;vk: GPU timeevery 120 presents:RX_VK_NATIVE_FADD=0Thanks @nullifyshot for both Windows RTX 5080 checks: the child runs in Kakariko and on Death Mountain Trail, then the adult follow-up on the trail. Your logs confirm the NVIDIA default selects the native add on Windows too, with lower GPU time in those comparisons; adult night and the AMD/Intel native paths remain untested.
Everything from my last review is fixed. With
RX_VK_NATIVE_FADDunset, only NVIDIA's driver asks for the extension (native_fadd_wanted,vk_main.cpp:249). AMD, Intel and NVK don't even enable it, so nothing changes for them. The switch is read withenv_value_off. The conflicts are resolved, keeping #2343'svk12field intest_amd_subgroup_profiles.py. nullifyshot's Windows RTX 5080 runs, child and adult in Kakariko and on Death Mountain Trail, show the same picture and about 4% less GPU time. That matches your RTX 4090 numbers.I merged it into current main and ran
test_native_float_atomic_add,test_global_atomic_add_f32,test_cas_loop_ceiling,test_amd_subgroup_profiles, the program cache and stamp checks,test_env_onand the SPIR-V checks with spirv-val present. All 15 pass. It also merges cleanly together with #1975.One thing for the maintainers:
translator_stampnow always adds the flag, so every player re-translates once, not only NVIDIA players. #1975 and #2309 also force a re-translation, so shipping them in the same release means one re-prepare. Widening the default to RDNA 3/4 can wait for an AMD run.github-sync referenced this pull request2026-11-12 16:54:48 +00:00