d3d12: use GPU count buffers for indirect mesh dispatches #429
Closed
PyZikYG wants to merge 2 commits from
upstream-pr/429 into main
pull from: upstream-pr/429
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
ProjectLeonida/mandy!429
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/429"
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 ubiquitarianism/leonida. Originally posted by PyZikYG on 2026-11-24T05:05:01Z.
Claimed as D3D-MESH-INDIRECT-COUNT.
Depends on: #424
A mesh-only ExecuteIndirect command with a GPU count buffer previously failed recording. This change reuses the compute indirect-count helper to prepare compact mesh dispatch records on the GPU. It reads the count at execution and writes zero-group records beyond the count, so even a UINT32_MAX counter is bounded by MaxCommandCount before drawing. The helper runs outside pipeline statistics queries. The count path requires buffer device addresses and compute scratch.
This PR includes the rebased #424 commit until #424 is merged.
AI-assisted: yes.
Imported from ubiquitarianism/leonida. Originally posted by Sangonapou on 2026-11-24T14:54:03Z.
Tested 909d3c2d (on top of #424) on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere, subgroup 32..32, mesh shaders), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300), native Windows: pass
Runtime built at this head with
scripts\build_runtime.ps1(MSVC 19.51, VS Build Tools 2026, Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0). No game files.ctest -R ^d3d12_mesh$ -V: passed, and the new path is taken on this card:mesh indirect used a GPU count buffer, thendirect and indirect mesh dispatches and a stream VS draw matched all 4096 pixels(D3D-29: mesh tier 1, native mesh stage). Same statistics line as #424 (mesh only: C 8/8 PS 1024).Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-25T15:53:36Z.
Retail result with this merged onto current
main(RTX 5080, NVIDIA 621.24): in the world phase the indirect draws recorded went from 4,096 recorded / 53,405 skipped to 9,172 / 516 in a run that also gainednative_hashes.txtandfspx_gfx, and the run showed a world picture (#1608 finding). So the draws this adds are what the world is made of;mesh indirectis gone from the skip reasons, onlytopologyremains.Because #1723 reworked
ExecuteIndirect, my merge is not your diff: mesh goes ExecuteIndirect ->record_indirect->draw_indirectwithmesh=true, so it inherits the argument clamp, the shared list budget, the range and usage checks, predication and bundle deferral, and it emits onevkCmdDrawMeshTasksIndirect[Count]EXTinstead of a loop. I keptmain's behaviour for compound signatures (created, then skipped with a counter). Your commits are kept as they are. Tests that pass on the merge:d3d12_mesh(extended with bundle, compound skip, kind mismatch and indirect mesh inside a statistics query),indirect_clamp, everyindirecttest, bundle tests,d3d12_draw, state map and replay pipeline compile tests;d3d12_meshand the stateful indirect tests also with validation on. Clamp counters in the retail run: 0 clamped, 0 zeroed, 0 over budget.Known limits of that merge: the clamp treats a mesh dispatch as one-dimensional (Y and Z forced to 1), which would cut a 3D grid; I saw no clamped record.
If it helps you rebase, I can push the merge to my fork as a branch for you to take from. I will not open a pull request of my own for it. AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by Rezn0r27 on 2026-11-25T17:06:17Z.
Tested PR #429 at
43433957on Windows 11 build 26300.9974 with an NVIDIA GeForce RTX 5070 Laptop GPU, driver 621.24. I used theruntime-windowsartifact from Actions run 45584633004.d3d12_mesh_test.exepassed (exit 0). It printedmesh indirect used a GPU count buffer, and all 4096 pixels matched for the direct and indirect mesh dispatches and the vertex-shader draw.One detail for anyone testing the Windows artifact: my first run exited with
0xc0000409. The three shaders were present in the extractedgeneratedfolder. After I made them available at the build-time pathD:\a\leonida\leonida\runtime\build\generated, the same executable passed with the same driver.I ran this single synthetic test locally. No game files were used. AI-assisted setup and report preparation.
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-25T17:18:07Z.
@DadaCap counts from your
mesh-indirect-on-main(255501cd9), as asked. Retail, RTX 4070 Laptop 8 GB, NVIDIA 621.40, Windows 11. Merged with #1849 #1867 #1887 #1896 #1860 #1889 #1886 (and #1893, now onmain), host image copy on. Settings:LEONIDA_VALUE_WAIT_TIMEOUT_MS=30000 LEONIDA_MAP_READBACK=1 LEONIDA_SERIAL_BIG_COMPILES=0 LEONIDA_TITLE_WATCHDOG=0, window cap 1024 MiB, arena 2048 MiB;fspx_gfx(18,493 programs) andnative_hashes.txtpresent. One run per row.LEONIDA_DEVICE_TYPE=6, 3 runs (one withoutMAP_READBACK)amd_fidelityfx_upscaler_xbox.dll+0x65ff(read at 0x10: a count of 0, then a null pointer read without a check). None of my 11 runs on the default device type shows it.recorded=4436 emitted=128,replay_skips=3662(allpending_pipeline), 0 record skips. Device lost at ~172 s, fault type 4, last pipeline$MS_VS_OctaSLODWind_5fd19871_Wrapped/PS_OctaSLODReZ_f191416b_WrappedLEONIDA_VK_VALIDATION=1recorded=131072 emitted=16760at ~400 s, the cutscene card over a plain green screen (it was black before). Only validation messages:VUID-VkImageViewCreateInfo-image-12397(16) and-usage-02275(14). Device lost at ~457 s, type 4LEONIDA_CONSOLE_RETRY_US=0emitted=1024, device lost at ~254 s, type 4So mesh indirect is no longer refused here (0 record skips). The last two losses end on the same dispatches (
lib_cs_02921indirect, thenlib_cs_03001at 160x90 andlib_cs_03006) and the same faulting code addresses, so it is reproducible. Mesh pipelines take 40-46 s each to compile here, and up to 113k draws wait for theirs. Next: the same with host image copy off, as you ran it.Did you see the upscaler crash with
LEONIDA_DEVICE_TYPE=6on the 5080? Counts and program names only. AI-assisted (Claude Code).Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-25T17:47:32Z.
@OreoFR thank you, these are useful counts. Correction (edited): I first wrote that I have not seen the
+0x65ffcrash. I did, once, in an early run today (m24,LEONIDA_DEVICE_TYPE=6): then only 22 of the 29 FSPX programs of the FidelityFX upscaler translated. With #674 and #1662 in the translator all 29 translated and the crash was gone in the next run (m25, one run each), so please check how many FSPX programs your shader folder has. Since m50 I have not seen it. All my recent runs useLEONIDA_DEVICE_TYPE=6(RTX 5080, 16 GB), and no log of the 19 or so runs since m50 has that address. The obvious differences are host image copy (mine is off, throughLEONIDA_HOST_IMAGE_COPY=0of #1851),LEONIDA_VALUE_WAIT_TIMEOUT_MS, and the 8 GB against 16 GB, so I can't say which one matters. Your host-image-copy-off run should tell.For the picture: in a run today with #1957, the G-buffer holds the textured scene at the world frames, but the lit buffer has only sky and emissive lights, and I found no
VS_TiledLightingorTL_PS_*pipeline in three logs. #1896 may be what is missing (its topologies); I am testing that now, with your list of merged pull requests containing it already, so whether your log hasTL_PS_*builds would be interesting. AI-assisted (Claude Code, Claude Opus 5.5).Imported from ubiquitarianism/leonida. Originally posted by quartz-heron-58 on 2026-11-25T17:55:58Z.
Retail data point for the merge DadaCap published (DadaCap/leonida
mesh-indirect-on-main), on a 16 GB card with 32 GB of RAM.RTX 4080 16 GB, NVIDIA 621.24, Windows 11 26300. Local merge: main
b0f3d3998+ #1849 #1893 #1889 #1860 #1886 #1882 #1887 #1851 + Snooozs's merge of #1592 +mesh-indirect-on-main(255501cd9; one conflict with the #1592 merge, in a printf of d3d12_mesh_test.cpp). fspx_gfx 16,914 programs, native_hashes.txt present, host image copy on,LEONIDA_ASYNC_PIPELINES=1,LEONIDA_TITLE_WINDOWS_MB=4096,LEONIDA_ARENA_MB=2048,LEONIDA_TITLE_WATCHDOG=0, three groups of very large compute programs skipped withLEONIDA_SKIP_COMPUTE(reason below), scripted keyboard pad.vkDeviceWaitIdle (title staging), one fault address of type 6, checkpoint a draw at submission 5,162 (list 3, command 0) with a mesh + pixel pipeline boundSo the mesh draws are recorded here as on the RTX 5080, but most are skipped at replay (38,024), and the one run ended in a device loss inside a mesh draw. I have not looked at why replay skips them (async pipelines not built yet is my first guess, since graphics pipelines build in the background in this run) and have no second run.
Why the compute skip: without it the world start cannot be passed on this machine. Compute programs of 6 to 24 MiB of SPIR-V (three name groups, about 15 programs) are compiled on the dispatch path, and nvgpucomp64 was still inside one after 46 s with the process growing by 3.6 GB in ten seconds; the next ones of 4 to 5.6 MiB take 20 to 57 s each. I will write that up separately in #1608.
Not checked: host image copy off,
LEONIDA_DEVICE_TYPE, validation, the mesh tests on this merge (only the build and the boot).AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by quartz-heron-58 on 2026-11-25T17:56:22Z.
Correction to my table above: the run without the mesh merge did not end cleanly either. Its log has a device loss at ~485 s that I missed (
vkDeviceWaitIdle (title staging), checkpoint a copy at submission 5,751 on a compute queue); the process then sat until my time limit. So both runs lost the device, at about the same time (471 s and 485 s) and at different commands (a mesh draw with the merge, a copy without), and the device loss with the merge cannot be put down to the mesh path from these two runs. The indirect counts stand.Imported from ubiquitarianism/leonida. Originally posted by quartz-heron-58 on 2026-11-25T19:02:18Z.
Second run with
mesh-indirect-on-mainon the RTX 4080, and it narrows what I reported above: both runs that had the merge lost the device at a draw with the same mesh + pixel pipeline pair bound.The run without the merge that I corrected above lost the device at a copy instead, so two of two with the merge end at this pair and zero of one without. The pair is a 64-wide mesh program of ~432 KiB of SPIR-V (run at this card's 32-wide size) with its pixel program; I keep program names out of posts, but can give the two FSPX code hashes if that helps find it on the 5080.
Separately, for anyone repeating this without async pipelines: with foreground builds the same merge did not reach that draw. Five of eight runs lost the device at the first world submission, checkpoint the first compute dispatch of list 0 (three of three with a 2,048 MiB arena, two of five with 4,095 MiB, the two being the runs that started from a warm pipeline cache).
Not checked: validation, host image copy off, whether the read fault is the mesh program's own or a neighbour's. Other local settings as in my first comment, plus a local size cut-off that drops compute programs over 3.5 MiB of SPIR-V in run 2 instead of the three name groups.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by quartz-heron-58 on 2026-11-25T19:19:30Z.
One more run, and it takes back the emphasis I put on "pair A": the pair is not special. With a local hack that never builds graphics pipelines using that mesh program (so its draws are dropped), everything else as in run 2, the device was lost at ~211 s at another draw (submission 3,388, list 4 command 71, kind draw) with a different mesh + pixel pair bound. Indirect graphics at the end: recorded 10,868, emitted 1,024, replay skips 7,054.
So on this RTX 4080 three of three runs with the mesh merge end in a device loss at a mesh draw, whichever mesh pipeline comes first, which points at what the mesh draws are given (arguments or the buffers they read; run 1's report had a read fault) rather than at one program. Still one machine, no validation run, and I have not looked at the arguments.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by quartz-heron-58 on 2026-11-25T19:19:49Z.
Correction to my last comment: the local hack never fired in that run (its log line is absent), so nothing was dropped and the run is simply a third run of the same recipe. What it shows is unchanged and a little simpler: this time the device was lost at a mesh draw with a different mesh + pixel pair bound, before any draw with pair A was built. Three of three runs with the mesh merge end at a mesh draw; two at pair A, one at another pair.
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-25T22:11:26Z.
@DadaCap answers for my RTX 4070 Laptop (8 GB, 621.40):
+0x65ffin any recent run, but those runs do not setLEONIDA_DEVICE_TYPE=6.TL_PS_*andVS_TiledLightingpipelines are built in my world runs (about 30 builds each).@quartz-heron-58 this matches what I see with
mesh-indirect-on-main+ #2077 + #1914 on main. Nsight Aftermath dumps show two variants, bothTimeoutwith no page fault:lib_cs_00959stuck at the loop head of the wave64 round scheduler (--wave64-emulate, rounds form);Bisect on this machine (one run each):
So on my side it is not the clamp, the rendering scope or skipped dispatches. I'm now running the mesh programs retranslated with #2102 (all of them).
Imported from ubiquitarianism/leonida. Originally posted by quartz-heron-58 on 2026-11-25T23:55:40Z.
@OreoFR thank you, that fits here too: every loss on this RTX 4080 since the arena was made large enough has only type-4 addresses, no read or write. Since you are testing #2102, three runs with it from this machine. Every number below was read back from the run logs before posting.
What was retranslated: the main corpus (26,503) and fspx_gfx (18,493) with the tools at
84816055d(#2102),--wave64-emulate. Of 400 mesh modules I hashed before and after, 400 changed. Not retranslated: the pipeline-library compute programs (still from the translator at71a769d7d, plus 830 from an older translation that the current one refuses), so lib_cs_00959 is unchanged in these runs and this only tests the mesh side.Runtime: main
b0f3d3998+ #1849 #1893 #1889 #1860 #1886 #1882 #1887 #1851, Snooozs's merge of #1592,mesh-indirect-on-main(255501cd9), Undefined3301's V# bound commit (338a32b, cherry-picked), and a local diagnostic patch (compute programs over 3.5 MiB of SPIR-V are dropped; the session cache is checkpointed while builds run).LEONIDA_ASYNC_PIPELINES=1, arena 4,080 MiB granted of 4,095 asked,LEONIDA_TITLE_WINDOWS_MB=4096, host image copy on, a warm session pipeline cache, NVIDIA 621.24, 32 GB RAM.vkDeviceWaitIdle (title staging), checkpoint a draw (submission 5,650, list 5 command 88), 15 addresses, all type 4The pair bound in run 3 is the second pair of my earlier comment (the one that is not pair A). Before #2102, with async builds, the three runs I reported above ended at mesh draws at ~160, ~211 and ~471 s; with it, one of three at ~275 s. Three runs are too few to call that a change, and two of the three were cut by memory, not by me choosing to stop.
Not checked: the compute library retranslated with #2102, TdrDelay (left at the default here), validation, Aftermath dumps.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by Tyrannys on 2026-11-26T02:20:22Z.
Runs of
mesh-indirect-on-main(255501cd9) from a second machine: RTX 4070 SUPER, NVIDIA 621.01, 64 GB. Counts only.Tree:
mainfe1553456+ #674 #1662 #1851 #1849 #1905 #1957 #1950 #1886 #1894 + #1592. The mesh runs also have 255501cd9 merged in. 3 conflicts in the indirect-draw code against #1896: I keptmain'stopology_supported()and this branch's mesh path, and added amesh_windowskip reason.Shaders: main corpus,
fspx_gfx(18,493) and library (2,683) translated with--wave64-emulateon that tree. The warm offline pipeline cache holds all 26,503 main pipelines. Library andfspx_gfxpipelines are built at run time.Recipe:
boot.ps1, 1,200 s,LEONIDA_TITLE_WATCHDOG=0,LEONIDA_DEVICE_FAULT=1,LEONIDA_DEVICE_TYPE=6, arena 2,048 MiB, host image copy off (auto: NVIDIA), the same 21-press input script, a fresh save folder each run. One run per row. Call counts are trace calls, one per call.vkDeviceWaitIdle (title staging), checkpoint a draw (submission 12,091, list 8, command 217), 1 address, type 4pending_pipeline)mesh), replay skips 81,412 (pending_pipeline)Not checked: #2102 retranslation, validation, Aftermath, more than one run per row.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by quartz-heron-58 on 2026-11-26T03:11:26Z.
A correction to all my runs above, and runs that line up with Tyrannys's row D. RTX 4080 16 GB, NVIDIA 621.24, Windows 11, 32 GB RAM. Counts only.
Correction. Every run I reported here before today was in Series X identity. My own launch script never set
LEONIDA_DEVICE_TYPE, so the runtime answered ConsoleMode 0x64 (type 7), not the 0x60 (type 6) thatboot.ps1sets. I checked the log line in each of those runs. So my memory numbers (28-29 GB private) and my device-loss times are Series X numbers and should not be compared with the Series S rows here.Series S, same patched tree as before (with 255501c merged), async builds: 2 runs. One ran 696 s with no device loss (private memory 22-25 GB). One lost the device at 132 s, checkpoint a dispatch, 2 addresses (one type 1, one type 6), so not the mesh-draw timeout signature.
Series S, plain main
3abb99c(no mesh merge), async builds: 3 runs of 571, 651 and 661 s, no device loss in any. That matches row D. Shaders: main corpus, fspx_gfx (18,493), library (2,635) and the 29 FSPX programs,--wave64-emulate.What stops those three main runs here is compile time on this driver, not a fault:
LEONIDA_COMPUTE_WARMUP=0, 60-90 frames/s until about 55 s, then submissions wait on single compute pipeline creates of 1.9-4.5 MB of SPIR-V: 91 waits (346 s in all, longest 40 s) and 61 waits (362 s, longest 135 s) in the two runs. The library here has 646 modules over 3.5 MB.Not checked: more than these runs per row, the mesh merge on current main in Series S mode, TdrDelay (default), validation, Aftermath.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by klikso on 2026-11-26T04:15:41Z.
Test result for this path on a slower card: on an RTX 3060 Ti 8 GB under Windows, with this branch merged (main
ffcfe68f1+ #1592 + this, plus #1862 #1851 #1886 #1882 #1905 #1944 #1957), the device is lost to a Windows GPU timeout (nvlddmkm event 153) in 3 of 4 runs while mesh indirect dispatches are recorded. With only the mesh kind skipped (local switch), 0 of 2 runs lose it. A list budget of 2^22 (at most 32768 mesh groups) didn't prevent it, so the cost looks per group rather than in the count. Table and counts: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7182436404. Not a blocker for the change itself, but on Windows below 5080 class this path may need a dispatch split or a mesh-group cap. AI-assisted.Pull request closed