Repository navigation
vulkan: allow in-place render-target feedback reads setting on Mali - #507
Conversation
a3f8763 to
0769b0e
Compare
|
Thanks! I'd rather not change the default on Mali yet: in-place feedback reads are undefined in Vulkan without the feedback-loop extension, they striped terrain on an Adreno 750 before (#129), and Mali's tile memory and AFBC are exactly where that goes wrong; the evidence is a mock test. Could you split it: the part that lets the "On" setting work on Mali (fine to merge), and the default change once someone runs it in-game on a Mali (Plateau terrain decals, the title background, fps on vs off)? |
0769b0e to
fe2f659
Compare
|
Split per your feedback in
|
…amcjr#507 review updates & v0.4.8-beta-mali rollout
|
Thanks, that's the split I hoped for. On the POCO (Adreno 830, Turnip) nothing changes: Automatic still reads in place, and the Plateau benchmark is the same as 0.4.8 (GPU p50 22.6 ms, p99 33.5 ms). One small thing before I merge: the Driver compatibility tab now hides "These options are for Turnip" on Mali, but GPU memory and LRZ there still do nothing on Mali. Could the note stay on Mali and say that only the draw-target reads apply there? Also, once #506 is in, this one conflicts with it in tools/test_rt_load_upload.c. |
fe2f659 to
2e36682
Compare
|
Updated in
|
…rktree cleanup, and PR mamcjr#507 rebase/UI note
|
Thanks! Tested on the POCO (Turnip): Automatic still reads in place there, GPU time unchanged, no stalls. Merged. |
Summary
Scoped per maintainer feedback so
Automaticstayscopieson all ARM Mali GPUs, while allowing Mali users to explicitly opt into in-place render-target feedback reads via Settings (Video -> Draw-target reads in place = On) orLARECOMP_FEEDBACK_INPLACE=1without switching to the Adreno-only fast path. No GPU driver detection changes (vk.h/device.care untouched).(Changing Mali
Automaticdefault can be evaluated separately later if desired.)Key Changes
runtime/nvn/vulkan/exec.c):Automatic(g_settings.inplace_reads < 0) ascopieson ARM Mali ([vk] targets a draw writes, sampled by it: copies (automatic)).g_settings.inplace_reads > 0("On"in Settings) orLARECOMP_FEEDBACK_INPLACE=1, logging[vk] targets a draw writes, sampled by it: in place (settings)/(LARECOMP_FEEDBACK_INPLACE), while keeping"Off"(= 0) andLARECOMP_FEEDBACK_COPY=1(AB("copy") == 1) taking precedence over explicit Settings"On".atoi(fi)beforeLARECOMP_FEEDBACK_COPY, guardsLARECOMP_FEEDBACK_INPLACE="", and keeps Android-only symbols inside#ifdef __ANDROID__(preserving clean-U__ANDROID__builds).runtime/settings.h,runtime/ui/launcher.mm, 11runtime/ui/i18n_*.inclocales):"Draw-target reads in place"picker note acrosslauncher.mmand all 11 localization files (de,es,fr,it,ja,ko,nl,pt,ru,zh_hans,zh_hant) to state that"Automatic"enables it for Adreno 8xx and"On"can be tested on Mali (Automaticoption wording remains unchanged).tools/test_rt_load_upload.c):6bverifying Mali (0x13B5)Automatic == copies, explicitinplace_reads = 1->in place (settings),inplace_reads = 0->copies (settings),LARECOMP_FEEDBACK_INPLACE(""/"0"/"1"),LARECOMP_FEEDBACK_COPY&AB("copy") == 1, pass breaks (stat_inplace_breaks), and non-Turnip/non-Mali (0x5143) negative control.Rollback / Zero-Overhead Guarantee
Automatic(default out-of-the-box config) performscopiesidentically to upstream on Mali, Qualcomm stock,< r49Mali, and desktop. SwitchingDraw-target reads in placefromOnback toAutomaticorOff(orLARECOMP_FEEDBACK_COPY=1) restores copy snapshots immediately.Isolated On-Device Verification (Exact
v0.4.8-betaCommitfe2f659)Environment: Galaxy Tab S11 (
SM-X730), Android 16,Mali-G925-Immortalis MC12(vendor 0x13b5,device 0xd8300010,driver-id 9,v1.r49p1-03bet0.f8a98b506b89b21c80a508d70abfcb3f), BOTW1.9.0, upstream base2b71a10(v0.4.8-beta), commitfe2f659(debug APK9ad15026af0d), USB-powered (plugged: 2, no off-charger power claims made).Verbatim runtime log proof (
AutomaticvsSettings On):inplace_reads = auto:[vk] targets a draw writes, sampled by it: copies (automatic)inplace_reads = 1:[vk] targets a draw writes, sampled by it: in place (settings)1. Official 30 FPS
benchmark.cA/B (warmup_s=8,calm_s=3,window_s=10, 301 frames/scene)zora-plazaAutomatic(copies)30.0029.4133.33/33.90 ms27.34/33.49 ms18.74/21.27 ms5.99 mszora-plazaOn(in place (settings))30.0029.4933.34/33.88 ms27.15/32.87 ms17.78/20.58 ms6.19 msplateauAutomatic(copies)30.0029.4633.32/33.92 ms26.82/33.43 ms17.60/20.23 ms6.51 msplateauOn(in place (settings))30.0029.1733.34/33.92 ms27.05/33.17 ms17.96/20.88 ms6.28 ms2. Uncapped 60 FPS Steady-Camera
[vk]A/B (LARECOMP_FPS=60, 2s[vk]intervals with0 skipped, compile 0duringS_WARMUP)(Note: upstream
benchmark.c:810exits non-30 FPS targets atS_WINDOW, so these metrics come from steady[vk]2s intervals beforeS_WINDOWexit.)max msfbcopy/ 2szora-plazaAutomatic(copies)743.20/43.3328 ms2697.0zora-plazaOn(in place)746.30/46.3130 ms0.0+3.10 fps(+7.2%),fbcopy -100%plateauAutomatic(copies)646.50/46.5729 ms936.7plateauOn(in place)647.70/47.5846 ms0.0+1.20 fps(+2.6%),fbcopy -100%Verbatim
[vk]sample (zora-plaza):Automatic(copies):[vk] t=29.1 frame 972 44.3 fps max 27ms level - (318573 draws, 0 skipped, 17054 passes, 5326 dispatches (2346 chained), 742 flushes, wait 27ms, compile 0 (waited 0ms), fbcopy 2759 (read 18690, breaks 0), ...)On(in place):[vk] t=28.8 frame 992 47.0 fps max 27ms level - (337253 draws, 0 skipped, 17743 passes, 5531 dispatches (2497 chained), 768 flushes, wait 17ms, compile 0 (waited 0ms), fbcopy 0 (read 68244, breaks 752), ...)Visual Verification (
SM-X730, Exact Commitfe2f659: Title Blurred Backdrop, Great Plateau Decals & Grass, Zora's Domain Wet Reflections)Automatic(copies)On(in place (settings))Additional Unit & Build Verification (
fe2f659)NDK 30):test_vulkan_compat.py(16 PASS),test_vulkan_startup.py(33 PASS),test_shader_cache.py(17 PASS),test_soft_linear.py(23 + 3 + 203 PASS).SM-X730,tools/test_android_runtime.ps1):7/7 PASS.launcher.mmand all 11runtime/ui/i18n_*.incfiles (0missing keys vs2b71a10);:app:assembleDebug --no-daemon->BUILD SUCCESSFUL (14s).Tested vs Untested GPU Matrix
SM-X730,r49p1)v0.4.8-betacommitfe2f659:Automatic (copies)vsOn (in place)30 FPS+60 FPSA/B + Title/Plateau/Zora paired screenshots + Bionic7/7< r49Automatic = copies; explicit"On"opt-in covered by unit testtest_rt_load_upload.c&#ifdef __ANDROID__