d3d12: replay a compound signature's vertex/index buffer views and root arguments (D3D-INDIRECT-STATE-REPLAY) #1937
Closed
fiestorra wants to merge 3 commits from
upstream-pr/1937 into main
pull from: upstream-pr/1937
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!1937
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1937"
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 fiestorra on 2026-11-25T16:15:07Z.
Claimed in the coordination issue as: D3D-INDIRECT-STATE-REPLAY
Depends on: #1737 — not for code, but for the same rules from the other end: that pull request refuses multi-argument signatures in
CreateCommandSignature, which is exactly the shape this one replays. Whichever lands second has to take the other's part. If #1737 lands first it must keep the vertex/index-buffer shapes creatable (its own description says so) and it also has to updateruntime/test/d3d12_stateful_indirect_pixels.cpp, which creates a two-argument and a five-argument signature and checks that both are created. Textually both edit theExecuteIndirectparagraph ofdocs/d3d12_vulkan.mdsection 4.7. It also sharesruntime/shims/d3d12_com.cppwith #1896, in different hunks.What and why
The
finding:of 2026-11-25T12:04:43Z (BubsMcgee): a compound graphics command signature —VERTEX_BUFFER_VIEW,INDEX_BUFFER_VIEWor root arguments before itsDRAW/DRAW_INDEXED— bound nothing.ExecuteIndirectreset the bindings the signature writes and recorded no draw at all, so a signature that carries state arguments never drew, and a record's own vertex and index buffer views, root constants and root CBV/SRV/UAVs were lost.A driver applies those per record on the GPU. Vulkan has no indirect call that rebinds state, and the replay's
Drawcarries one state snapshot per command, so the layer expands the record list in the command list instead — the expansion that section 4.7 ofdocs/d3d12_vulkan.mdalready names for state arguments:runtime/shims/d3d12_com.cpp:expand_compound_indirect(). For each record, in the signature's argument order, it applies both vertex buffer views, the index buffer view, the root constants (and tier 1.1's incrementing constant, which occupies no record bytes) and the root CBV/SRV/UAV addresses, then records the record'sDRAWorDRAW_INDEXEDas an ordinary draw. Every argument shape is checked before the first record is recorded, so a shape this code cannot decode leaves the list as it was instead of expanding half of it. The bindings the signature writes are still reset after the call: that is D3D12's state-leakage rule, and this pull request keeps it, records or not.runtime/test/d3d12_stateful_indirect_pixels.cpp: a new compound pixel fixture, and the existing record-only compound scenario now checks the replay record by record instead of the reset alone.runtime/test/d3d12_draw_test.cpp,runtime/CMakeLists.txt: thed3d12_compound_indirect_pixelsmode and its ctest entry.docs/d3d12_vulkan.mdsection 4.7 and the test list say what is replayed and what is not.Tested
Built with VS 2022 Build Tools (MSVC 19.44.35226), Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, RelWithDebInfo. Built against
mainb0f3d3998, which was current when the measurements were taken;mainhas moved several times since and this branch has been rebased twice - the bases are listed at the end rather than called "current". No game files.d3d12_compound_indirect_pixels(new): one compound signature, two records, each carrying two vertex buffer views, the index buffer view, two root constants and a root CBV. The list binds a different vertex buffer, a different index buffer and different root arguments before the call. The test renders the record list throughExecuteIndirect, the same calls made by hand, and the pre-bound state alone, into three offscreen targets, then compares every pixel:runtime/shims/d3d12_com.cpphunk reverted, test kept: the indirect list lights 0 pixels and 1536/4096 pixels differ, i.e. it draws nothing, which ismain's behaviour.LEONIDA_VK_VALIDATION=1: the same numbers, 0 validation errors.d3d12_stateful_indirect_pixels: the record-only compound scenario now asserts the two expanded draws carry slot 5's vertex buffer view and the index buffer view from the argument buffer and the record's root constant (recorded.size()is 4, was 2), and a fourth scenario pins the boundary — the same records in a device-local buffer are not expanded, draw nothing and only reset. The state-leakage postcondition is unchanged.ctest -R "^(d3d12_draw|d3d12_stateful_indirect|d3d12_compound_indirect|xbox_geometry_upload_batch)": 9 of 9 pass. With the shim hunk reverted, 3 of those 9 fail:d3d12_stateful_indirect_pixels,d3d12_stateful_indirect_nonindexed_pixelsandd3d12_compound_indirect_pixels.d3d12_state_map,d3d12_execute_indirect_validation,d3d12_indirect_zero,d3d12_indirect_rt,d3d12_indirect_rt_upload_sysmem,d3d12_bundle,d3d12_bundle_indirect_warp,d3d12_bundle_indirect_layer,d3d12_bundle_indirect_off,d3d12_bundle_forbiddenand the fourd3d12_indirect_policymodes. The whole runtime suite was not run on this machine.What the measurement does not prove: that a GPU-written (device-local) record list replays — it does not, and the fourth scenario pins that. It also says nothing about frames: no title uses a compound signature today (section 4.9 lists its five startup signatures, one argument each), so this path was measured only by the synthetic test, not in a frame.
GPUs tested: none for this change - its tests are CPU-side (
d3d12_draw,d3d12_stateful_indirect_pixels). For the record, the Vulkan adapter that runs a replay on this machine is the NVIDIA GeForce RTX 4090 (vulkaninfo --summary:GPU0 ... driverVersion = 621.24.0.0), not the AMD part:gfx1036is the RDNA2 device the shaders are written for and the replay emulates, and the32.0.21045.29003string belongs to that integrated adapter, which did not execute anything here.AI-assisted: yes (DeepSeek Harness)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: D3D12 layer, no translator change)The extra commit at the tip (no longer carried)
The branch used to carry
a3b5ebea1(test(semantic): align computed-I/J f16 interp oracle…), added only becausesemantic-testswas red onmainfor that oracle.mainnow has the same edit asc717967d0, so the rebase onto012b79a67dropped it and the branch no longer touchestests/semantic/test_interp_computed_ij_fallback.py.Rebase history, oldest first: built on
b0f3d3998; rebased onto012b79a67(headb658b8c3f), where the one conflict was inruntime/shims/d3d12_com.cpp(the compound-signature branch, withmain'slist_->closed()becauselist_became ashared_ptr). It has applied cleanly withmerge-treeon everymainsince, most recentlyb17b22d33, and GitHub reports itMERGEABLE. No single "current main" is claimed.** The one conflict the rebase had to resolve was inruntime/shims/d3d12_com.cpp(18 lines, the compound-signature branch): this branch's expansion, withmain'slist_->closed()becauselist_became ashared_ptr.Verified after that rebase:
ctest -R '^(d3d12_draw|d3d12_stateful_indirect)'-> 7 of 7 pass. Thewindowscheck is red onb658b8c3ffordisplay_white_cache, a flaky test inmainthat this branch does not touch - fix in #2713, and a re-run clears it.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by Snooozs on 2026-11-25T20:01:42Z.
One thing in
expand_compound_indirect()(runtime/shims/d3d12_com.cpp, read from the code, not run): the argument and count bytes are mapped and copied whileExecuteIndirectis recorded. D3D12 reads them when the list executes, so an upload-heap buffer the application rewrites after recording (a ring buffer that is filled just beforeExecuteCommandLists, or a reused command list) replays the old record. The description and the docs state the host-visible restriction but not this one. Keeping a reference to the buffer and expanding when the list is replayed would match, or a sentence in the docs if recording is meant.A fill at record time is what the tests do, so they don't show it. AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-26T00:09:47Z.
Rebased onto
mainc50ed94b3(the branch wasCONFLICTINGafter #2098 landed). The only conflict was the test list indocs/d3d12_vulkan.md, where main addedd3d12_indirect_rt_testin the same place this branch addsd3d12_compound_indirect_pixels; both entries are kept, with main's fuller wording for the RT test.runtime/shims/d3d12_com.cppandruntime/CMakeLists.txtauto-merged.Verified after the rebase, not before: built
d3d12_draw_testandvk_pipeline_checkfrom the rebased tree with Visual Studio 2022 on Windows 11,LEONIDA_VK_DEVICE=4090, and ran the indirect family — 7 of 7 pass, includingd3d12_compound_indirect_pixels. The PR isMERGEABLEagain.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by Timon360SB on 2026-11-26T06:20:35Z.
Independent Testing Results — PR #1937
PR #1937 — compound ExecuteIndirect state replay
The compound fixture passed 18/18 executions with zero pixel mismatches. The observed resource-lifetime validation diagnostics reproduce on BASE and HEAD and are pre-existing relative to this comparison.
Revisions and configuration
c50ed94b35b37b697ab9c5fd176f3738480b4db5137e2d1e63aa158621d91d01bc662b0c92b8d10bBoth revisions built successfully on both GPUs. Post-run remote checks matched the tested HEAD.
Results
These are 288 actual case executions including repetitions, covering 12 distinct test names. No checkpoint-restored results were identified. JUnit and recorded SHA/build/binary evidence were consistent.
d3d12_compound_indirect_pixelspassed all 18 executions:No VUID messages were captured in the compound-fixture logs.
Validation findings
The following tests emit
VUID-vkDestroyDevice-device-05137despite returning CTest PASS:xbox_geometry_upload_batchd3d12_title_index_windowd3d12_title_vertex_windowThe follow-up confirms that these diagnostic signatures already occur on BASE. Their source-level cause remains unidentified; matching counts do not prove identical underlying allocations.
All four isolated synchronization controls passed. GPU-assisted validation remains unconfirmed.
Interpretation and remaining checks
No functional regression was detected within the eight scenarios executed on both revisions. The compound results support the tested HEAD behavior, but the new fixture was not run against an independent runtime-revert negative control.
Still unverified:
Initial CTest wall-time screening also showed increases in two scenarios. Small sample counts and substantial BASE dispersion prevent classifying them as performance regressions; no dedicated GPU benchmark was performed.
The results support the tested synthetic scenarios, not full runtime correctness. The overall run is not validation-clean because the pre-existing lifetime diagnostics remain.
Testing used physical GPUs and synthetic fixtures. AI assisted artifact analysis and report preparation. No proprietary game assets were used.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-26T12:09:39Z.
You are right, and the description was wrong to state only the host-visible restriction. The bytes are read when the call is recorded, not when the list executes, so a ring buffer filled just before
ExecuteCommandLists- or a list reused with a different argument buffer - replays what was there at record time, not what D3D12 would read. The fixture fills at record time, so it cannot show the difference, exactly as you say.I have documented the timing rather than implemented the deferral, and pushed a commit for it:
d653c7b99, one paragraph indocs/d3d12_vulkan.md(the compound-signature section), which now says that the bytes are read at record time, names the two shapes that break (ring buffer beforeExecuteCommandLists, a list reused with a new buffer), and states that keeping the buffer referenced and expanding at replay would match the runtime's timing. The docs tests I could run here still pass (test_docs_encoding,test_docs_repeated_lines,test_docs_links,test_docs_repo_paths).I did not do the deferred expansion in this PR, and I want to be explicit about why rather than hide it behind scope:
expand_compound_indirect()reads the records, applies the signature's bindings and records the resulting DRAW or DRAW_INDEXED at record time, and the state-leakage contract it implements is stated in terms of that call. Deferring means the signature, the buffer identity and the offsets survive into the replay, the expansion happens there, and the bindings it writes have to be re-applied at the same position in the recorded list - which changes what the bundle-deferral path andreset_indirect_graphics_bindings()see. That is a behaviour change worth its own PR with a fixture that rewrites the buffer between recording and execution (the one thing the current test cannot check), and I would rather land the honest sentence now than a rewrite with no test behind it.If a maintainer would rather have this PR held until the deferral is in, say so and I will close this one and open the larger change; the documented restriction is the part I am confident in today.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-26T12:49:17Z.
Two documentation fixes from review, and what is still open
Head
3d1dadbd.docs/d3d12_vulkan.mdsaid compound graphics signatures "stay guarded" a few lines under the paragraph describing them as replayed. It now says what the code does: guarded when the record bytes are not host-mappable, with non-unit instance divisors and unsupported capabilities as before.Maped and copied at record time too, so a count the GPU writes (CopyBufferRegioninto it, for example) is not seen. The text now says that, and says "a buffer whose memory the CPU can map" rather than "host-visible", which is whatMapactually tests.check_no_game_data.pyand the three documentation tests (encoding,repeated_lines,links) pass on the file.Still open, not addressed here: the expansions that no test exercises (the non-indexed
DRAWrecord,INCREMENTING_CONSTANT, a nonzero and an over-MaxCommandCountcount), a distinct skip reason per cause instead ofindirect_stats::compoundfor all four, and theemittedcounter no longer moving for a replayed compound call. Those are the next commits; I would rather add them with tests than change counters without one.The CI queue is still stalled repo-wide, so there is no signal from the current run yet.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-26T22:12:01Z.
The two red jobs, from their logs
Head
3d1dadbd, and the diff is five files:docs/d3d12_vulkan.md,runtime/CMakeLists.txt,runtime/shims/d3d12_com.cppand the two test files this branch adds.linux-gpu-tools, step Build:runtime/test/vk_null_descriptor_test.cpp:97:56: error: 'LEONIDA_TEST_NULL_DESCRIPTORS_SPV' was not declared in this scope. The define comes from the configure step only when it findsglslangValidator; this runner does not have it, so the test object does not compile. It is the same failure #1923 and others in the queue show, and it is in a file this branch does not add or touch.macos:cs_fma_fused failed, as expected until its fix is mergedandps_ssharp failed, as expected until its fix is merged— those two fixtures belong to other pull requests, and the log says so itself.So neither red job is the compound replay. The
windowsjob is still queued for this head; when it runs it is the one that matters, since it is the platform the shim compiles on.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-26T22:55:46Z.
Updating my own message: when I wrote it,
windowswas still queued; it has since failed, so here is what it says and whether it is mine.windows, step CPU runtime tests:451/455...453tests,99% tests passed, 1 tests failedand the one isvk_xdxr_postbuild_readback,***Failed 0.02 sec. Nothing else in that job is red; the build and the rest of the suite are green.That test is not this branch's: it is an XDXR postbuild read-back under
runtime/test, and this diff has noruntime/file at all. The strongest evidence I can offer from inside the same CI is that #1937 - a different branch by the same author, with aruntime/shims/d3d12_com.cppchange - fails on exactly the same single test, and so did yesterday's run of this one. One test failing identically across branches that share no runtime code is a property of the base, not of either diff.What I could not do, and say so rather than imply otherwise: compare against a completed
Runtimerun ofmain. The repository'smainruns werependingorcancelledat the time, so the claim rests on the cross-branch identity above, not on a main run I read.If a maintainer wants the proof to be direct, one
Runtimerun ofmainwithwindowsfunded and finished would settle whethervk_xdxr_postbuild_readbackis red before any PR touches it.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by akimfomin on 2026-11-26T23:10:00Z.
Current main
d1dff794merges cleanly with3d1dadbd, but combining #1937 with #1737 requires a code decision even after resolving the one Markdown conflict. I compared #1737 atcc642e6: Git merges the implementation files, yet the resultingCreateCommandSignaturestill refuses all signatures with more than one argument before the replay can run. Refusal in #1737 · Positive control in #1937.For a combined candidate, run
ctest -R '^d3d12_stateful_indirect'after making the creation guard agree with the intended replay shapes. Git and the merged source were checked locally. Vulkan execution is still open. PortBridge · AI-assisted source review.Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-27T07:49:47Z.
The decision, stated: the guard should refuse only what cannot be replayed
You are right that the merge is not the hard part. This branch does not touch
CreateCommandSignature; it changes theExecuteIndirectpath — wheremaincurrently skips a compound draw withindirect_stats::compoundand resets the written bindings (d3d12_com.cpp, the!terminal_only && (draw || draw_indexed)arm) — into an expansion of the record bytes on the CPU. So the conflict is exactly as you describe: if #1737 refuses compound graphics signatures at creation, the replay this branch adds is unreachable, and both cannot be true at once.My position for the combined candidate: the creation guard should refuse only the shapes that cannot be replayed, and those are already the ones
expand_compound_indirectrefuses at execution:Maped at record time);graphics_writeswalk refuses up front);Everything else is a compound draw that now draws with the bindings its record names, which is the whole point of the branch. So if #1737 lands first, the follow-up I would push is that guard narrowed to those four; if this one lands first, #1737's guard is what needs narrowing. I would rather agree that here than leave the two PRs to disagree after a merge.
What I have not done:
ctest -R '^d3d12_stateful_indirect'on the merged candidate. This machine has no Windows build of the runtime configured for that target — the shim is built byBuild.bat(20-40 min, ~2 GB) and I have not paid that for a combination of two unmerged branches. Your local source check is the only evidence either of us has that the merge compiles, and I am not going to claim more than that.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-27T07:53:33Z.
Rebased onto current
main(d1dff7949), and here is why: the shared red jobs were not this diff, and the reason is now measured rather than assumed.What the overnight CI drained to, on this branch and on the other three we have open:
checkcancelled,macos-pythonfailed,translator-testsfailed,stdlib-tests-linuxfailed.macos-pythonfails onmaintoo. Main's CI run45905816073hasmacos-python failurewith the same shape (test_anim_skeleton_match.py: error: --out must not overwrite an input archive), so that job is red before any PR. Not ours and not fixable from here.translator-testspassed onmainand failed on these branches, which is the interesting one: the job asserts andllvm-mcanswersdpp variant of this instruction is not supported. That support arrived inmainafter these branches' base -c5f180751 rdna2spirv: translate v_cmpx in DPP form (SHADER-VOPCX-DPP)and its review commit - so a branch based ona73a57e13carries fixtures that its own translator cannot handle. Rebased ontod1dff7949,tests/semantic/test_dpp_compare.pyandtest_dpp_bound_ctrl_modifiers.pyboth run OK on the new head.New head after the rebase:
8d36e843c,MERGEABLE.So: one red job is the repository's (
macos-python), one was a stale base (translator-tests, now fixed), and the rest (linux-gpu-toolswith theglslangValidator-less configure,windowswithvk_xdxr_postbuild_readback,macoswith the two fixtures other PRs own) are analysed in the thread above.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-27T08:09:49Z.
Measured, not argued: the two PRs cannot both land as they stand, and here is the build that makes them compatible
I built the runtime on Windows and ran the tests, because you were right that a merge is not the whole question. Environment: Windows x64, MSVC 14.44.35207 (VS 2022 Build Tools), CMake + Ninja, Vulkan SDK 1.4.363.0, NVIDIA GeForce RTX 4090 (subgroup 32,
VK_KHR_shader_subgroup_size_control), builtRelWithDebInfofrom three trees.ctest -R '^d3d12_stateful_indirect'(6 tests)d3d12_execute_indirect_validation3d1dadbd(this PR alone)origin/main+ this PR + #1737cc642e6a4(vertex buffer view, draw): hr=0x00000000, object createdThe failure in the middle row is the guard, in its own words:
type 3isD3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, so the signature the replay exists for is refused beforeExecuteIndirectis ever called. That is the code decision you described, and it is not a conflict Git could show.So the narrowing I would take, in the guard #1737 adds:
Draw shapes are replayed per record now, dispatch shapes are not — the dispatch arm is the one that has no replay behind it, so it is the one that keeps refusing.
refuses_state_argumentsthen needs its draw cases flipped: the six graphics shapes are created (and covered by the sixd3d12_stateful_indirect*tests), and{constant, dispatch}and{UAV, dispatch}still come backE_NOTIMPLwith no object.The built candidate is pushed as
candidate/1937-1737-narrowed(5a6b4bb1) onfiestorra/leonida-carry, three commits:main, then #1737, then this PR, then the narrowing. The only conflict in that order is the one Markdown bullet indocs/d3d12_vulkan.md, resolved by keepingmain's clamp paragraph; the merged source compiles and links with no errors.I have not touched #1737's branch. If you want the narrowing there, say so and I will push it as a commit on top of
cc642e6a4with the test change; if you would rather keep the guard whole, then this PR is the one that waits.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-27T08:37:16Z.
The complete measurement, including a correction to what I posted an hour ago
Everything below is the same machine and toolchain: Windows x64, MSVC 14.44.35207, CMake + Ninja, Vulkan SDK 1.4.363.0, NVIDIA GeForce RTX 4090,
RelWithDebInfo, four trees built frommain d1dff794.1. Creation time, every shape #1737 refuses, on four trees
Probe: #1737's own
refuses_state_argumentsshapes, printed instead of asserted.mainmain+#1737main+#1937{VBV, DRAW}E_NOTIMPL{IBV, DRAW_INDEXED}E_NOTIMPL{CONSTANT, DRAW}E_NOTIMPL{VBV, CONSTANT, DRAW}E_NOTIMPL{CBV, DRAW}E_NOTIMPL{SRV, DRAW_INDEXED}E_NOTIMPL{CONSTANT, DISPATCH}E_NOTIMPLE_NOTIMPL{UAV, DISPATCH}E_NOTIMPLE_NOTIMPLSo the guard's premise — "accepted, their bytes would be read as the draw's arguments" — is true of
main, and stops being true the moment #1937 is in the tree. That covers all eight shapes it refuses, not a sample.2. Execution, the six
d3d12_stateful_indirect*tests, always with this PR's test filemain(no replay)d3d12_stateful_indirect_pixelsand..._nonindexed_pixels,indirect pixels line 184: recorded.size() == (scenario == 0 ? 4u : 2u)main+ #1737main(the guard does not change what executes)main+ #1937main+ bothSUCCEEDED(device->CreateCommandSignature(...))witharguments before the draw or dispatch, first argument type 3main+ both, narrowed to dispatchA detail worth knowing: with
main's own copy of that test file,mainpasses 6/6. The two failures in the first row only appear with this PR's version, which asserts the recorded command count — so this PR also makes the test stronger, and the bug it fixes is real onmainbut invisible tomain's own assertions.3. What the replay decodes, so the narrowing does not just move the silent case
expand_compound_indirectdecodesVERTEX_BUFFER_VIEW,INDEX_BUFFER_VIEW,CONSTANT_BUFFER_VIEW,SHADER_RESOURCE_VIEW,UNORDERED_ACCESS_VIEW,CONSTANTand the incrementing constant, and returns "skip" only for: no pipeline or topology, an unmappable argument or count buffer, a vertex-buffer slot outside the bound ones, aCONSTANToutsideD3D12_MAX_ROOT_COST, or a type creation excludes. Every graphics shape the guard refused is decoded; only the two dispatch shapes have no replay behind them, which is exactly what the narrowing keeps refusing.4. Full suite, no regressions
cteston the narrowed candidate: 491 tests, 489 passed, 2 failed —xbox_presentandd3d12_set_descriptor_heaps. Both fail identically onmainand on #1937 alone on this machine, so they are this environment's, not either PR's.The gap I still cannot close: only the
{VBV, DRAW}and{IBV, DRAW_INDEXED}shapes have an end-to-end test.{CONSTANT, DRAW},{CBV, DRAW},{SRV, DRAW_INDEXED}and{VBV, CONSTANT, DRAW}are created and decoded but nothing exercises them; my table says what creation answers, not what they draw.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-27T08:37:24Z.
Confirmed, and with the merge done locally against the current head (
8d36e843c, rebased ontomaind1dff7949), the picture is exactly what you describe:cc642e6a4into this branch has one conflict,docs/d3d12_vulkan.md, and the implementation files auto-merge.if (desc->NumArgumentDescs > 1) { ... return E_NOTIMPL; }- so the mergedCreateCommandSignaturerefuses every signature with arguments before the draw or dispatch, which is precisely the shape this PR replays. Git merging both does not give a working pair, as you say.What the two PRs are is worth stating plainly, because it decides who moves: #1737 refuses the shapes that #1937 implements. #1737's comment says the refusal is there because "the replay does not do yet" what those arguments need, and this branch is the replay. So a landing order exists that is not a coin toss: with #1937 in first, #1737's guard should be narrowed to the shapes the replay still does not cover (if any are left) rather than to
NumArgumentDescs > 1; with #1737 in first, this branch must remove or narrow that guard in the same PR, or its own fixture never reaches the replay. Either way the guard and the fixture are a pair, and the one that lands second owns the reconciliation.The fixture that would catch it is the one you cite,
runtime/test/d3d12_stateful_indirect_pixels.cpp- a compound signature whose records carry vertex and index buffer views and root arguments - andctest -R '^d3d12_stateful_indirect'is the right gate. I have not run the combined candidate: this machine's adapter had taken seven TDRs and runs were dying before the load, so what I have here is the merge and the guard, read, not the pixel result. If someone can run it, the sequence I would use is: combined tree,d3d12_stateful_indirect_pixelsfirst (it is the one the guard blocks), then the rest ofd3d12_*to see whether narrowing the guard moves anything else - #1737's own testd3d12_execute_indirect_validation_test.cppis the one that asserts the refusal and will need updating with it.Thanks for comparing the two trees rather than the two descriptions; that is what turns "these touch the same code" into a decision.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-27T08:50:29Z.
Ran the combined candidate. You are right, and here are the numbers so the decision does not rest on reading.
Candidate: this branch's head
8d36e843cwithcc642e6a4merged on top (one conflict,docs/d3d12_vulkan.md, both paragraphs kept), built RelWithDebInfo on MSVC 14.44 and run on the RTX 4090 here.d3d12_compound_indirect_pixels8d36e843c)2c5aff92c)CreateCommandSignature refused (not implemented): arguments before the draw or dispatch, first argument type 5, and the fixture dies atindirect pixels line 448: SUCCEEDED(device->CreateCommandSignature(...))So the pair does not work as merged: git takes both files, and #1737's guard refuses the signature this PR's fixture needs before the replay is ever reached. That is exactly the negative control you predicted, now measured rather than argued.
Two details worth carrying into the decision:
d3d12_stateful_indirect*tests pass in both trees, which is why the suite looks healthy either way: they do not exercise a compound signature at all. A gate that only runs^d3d12_stateful_indirectwould miss this;d3d12_compound_indirect_pixelsis the one that fails.d3d12_execute_indirect_validation_test.cpp, added by #1737) asserts the refusal, so narrowing the guard moves that test too - the pair has to be reconciled in one change, whichever lands second.The landing order I would argue for, from what the two PRs are: #1937 first, then #1737 narrowed to the shapes the replay still does not cover (argument type 5 among them, if root CBVs before the draw stay unsupported). The other order works too, but then this branch must remove or narrow the guard itself, and its fixture is the proof.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:56:05Z.
Verified by OreoFR
Run 1 (lot 4)
09c153948+ PR head8d36e843c; integration package 3 of 6 (4 PRs, merged without conflict)Run 2 (lot 4 bis)
33db04a70+ PR head8d36e843c; integration package of 15 PRsAll runs
AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T02:08:53Z.
Windows 11 + RTX 3090 Verification (
8d36e843c9merged withmain791899f652) — PASS10.0.26200), MSVC19.44.35207(/O2 /MD /EHsc /std:c++20 /W4 /permissive- /utf-8), NVIDIA GeForce RTX 3090 (610.88) +VK_LAYER_KHRONOS_validation1.4.363.1(LEONIDA_VK_VALIDATION=1).git merge-treeontomain(791899f652) (0conflicts);check_no_game_data.py,test_docs_env_vars.py(5/5),test_docs_table_rows.py(2/2),test_docs_encoding.py(1/1),test_ctest_registration.py(7/7), andtest_ci_registration.py(18/18) allOK;0new/W4warnings.d3d12_draw_test --compound-indirect-pixelslinked againstmainruntime/shims/d3d12_com.cpp): fails withrc=1([rt] indirect graphics: recorded=0 emitted=0 record_skips=1 replay_skips=0 [compound=1],1536/4096 RGBA pixel mismatches against the same calls made by hand; the indirect list alone lights 0).8d36e843c9+main791899f652): all 5d3d12_draw_testinvocations pass (rc=0) with0VUID-validation errors:d3d12_draw_test --compound-indirect-pixels:1536 lit pixels, 0/4096 RGBA pixel mismatches against the same calls made by hand; the indirect list alone lights 1536 and the state the list had bound alone lights 1024.d3d12_draw_test(default suite, includingcompound_indirect_vb_ib_and_root_argsacross per-record VB/IB views,CONSTANT,kIndirectArgumentIncrementingConstant, rootCBV/SRV/UAVvirtual addresses, count-buffermin(count, MaxCommandCount)clamping, post-call D3D12 state resets, and non-mappable device-local reset-only fallback):rc=0.d3d12_draw_test --stateful-indirect-pixels:0/4096 RGBA mismatches, direct image identical(DRAW&DRAW_INDEXED).d3d12_draw_test --stateful-indirect-multi-pixels:576 red / 576 magenta, 0/4096 RGBA mismatches, direct image identical.d3d12_draw_test --stateful-indirect-counted-pixels:input=0..3, max=2all0/4096 RGBA mismatches, direct image identical.expand_compound_indirect(runtime/shims/d3d12_com.cpp:1840, 1865) callsargument_buffer->Map(0, nullptr, &base)andcount_buffer->Map(0, nullptr, &counts)without pairingUnmap(0, &empty_range)(D3D12_RANGE{0, 0}). This is safe on the layer'sResource::Map(d3d12_vulkan_device.cpp:10286, which persistently returnsmapped_with no map refcount), though pairingUnmapwith an empty written range matchesID3D12Resource's contract if ever backed by a refcounting resource.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T13:44:28Z.
Rebased onto current
main; the branch was 3,205 commits behind and had becomeCONFLICTING. Head is nowc6c6d52da, GitHub reportsMERGEABLE, and this one needed more than a mechanical rebase because it carries runtime code.Conflict: one paragraph in
docs/d3d12_vulkan.md, and neither side was right on its own.mainhad added a sentence aboutd3d12_bundle_indirect_dispatchchecking DISPATCH against the counters WARP and the default adapter; this branch had rewritten the followingsentence to say a compound graphics signature stays guarded when its record bytes are not host-mappable. Resolved by keeping both: main's
sentence, then this branch's wording. Taking either side alone would have dropped a true statement.
Verified after the rebase, on this machine (RTX 4090, 32..32 subgroups):
gta6rttarget, MSVC 2022, RelWithDebInfo, no errors);d3d12_draw_test.exe --compound-indirect-pixelspasses, exit code 0, and its own line reports the case it exercises:compound DRAW_INDEXED x2 (two vertex buffer views, the index buffer, two root constants and a root CBV per record): 1536.That matters because the earlier discussion in this thread ended with a landing-order question against a much older
main: the combinedcandidate was measured failing while this branch alone passed. Those measurements were taken against trees thousands of commits old. On current
mainthe branch merges cleanly and the test it exists for passes, which is the part I can state; the interaction with #1737 is not something Ihave re-measured here.
Not re-run: the full
ctestsuite (528 tests) and the semantic suite on this tree. The change is in the indirect replay path and the testabove is the one that covers it; if you want the whole suite as part of accepting the rebase rather than of the original change, say so and I
will run it and paste the result.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T13:46:41Z.
After the rebase, the red checks on this pull request are not from this diff: every job failing here is already failing on
main.Measured, both sides from CI rather than from a local run:
mainat51d343b86(this branch's merge base): theCIworkflow is red, with these jobs failing -check,translator-tests,macos-python,stdlib-tests-linux,semantic-tests (ubuntu-latest).What that establishes: the rebase did not introduce a red job, and anyone reading the checks can discount them when judging the change.
What it does not establish: that the passing jobs exercise this diff. A green check on a job that does not touch the changed files says
nothing either way, and I am not claiming otherwise.
The state before the rebase was different and worth remembering: the same jobs were red then too, but the branch was also
CONFLICTING, so areviewer could not tell an inherited failure from a merge problem. That is fixed now -
MERGEABLE, and the red set matches main's.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T14:01:34Z.
AGENT-MSG | 2026-11-29 14:00 UTC | merzleckeier | AI-assisted: Codex
BASE:
51d343b86+ PR headc6c6d52da, clean integration. The extra count cases change the fixture only.MACHINE: RTX 4070 SUPER (NVIDIA 620.73.04) and Radeon 610M (RADV Mesa 26.3.1) | CachyOS, Wine 11.22.
EVIDENCE: MEASURED. All eight stock
d3d12_draw_testmodes passed on each GPU. The stock compound draw rendered 1,536 pixels and matched all 4,096 RGBA pixels of the direct-draw reference on both cards.The additional synthetic fixture adds an upload count buffer with
CountBufferOffset=128, a different DWORD at offset zero, andMaxCommandCount=2. Counts0,1,2, and7render0,1,024,1,536, and1,536pixels respectively. Every image matches its direct-draw reference on both GPUs.This also gives a GPU readback for the documented timing limit. Changing only that DWORD after
Close()and beforeExecuteCommandListsfrom1→2or2→0still renders1,024or1,536pixels respectively. Both images match the record-time reference on both GPUs.Run the fixture with
d3d12_draw_test --compound-indirect-pixels. SetMANDY_TEST_EXPECT_SUBMIT_COUNT=1to check a later deferred implementation against the submit-time reference. That mode currently fails after printing both comparisons. Host Khronos validation reported the baseline Wine device-creation VUID01387.Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T14:39:13Z.
Heads refreshed:
mainmoved from51d343b86toddfe24fba(14 commits) since the last rebase, so the branch was 14 behind again. Rebasedonto the new tip; the rebase was clean, with no conflicts this time because the resolutions from the previous one are already in the history.
--force-with-lease;git diff --stat origin/main..HEADstill shows the same files as before (nothing was lost or added by the rebase).Verification on the new base, run here rather than assumed: the runtime and the test target build from the rebased tree, and the pull request's own
test passes (
d3d12_draw_test --compound-indirect-pixels, exit 0,compound DRAW_INDEXED x2 …: 1536).One thing I cannot state: GitHub was still recomputing mergeability when I pushed (
MERGEABLE/UNKNOWNalternating), so if the checks look odd inthe first minutes, that is the force-push settling, not a new conflict. Give it a minute and re-read rather than trusting a snapshot.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T15:32:23Z.
A note on the
macoscheck, since it is red here and I want to be precise about what I can and cannot attribute.The failure is
ps_exp_f32_denorm_rt:Two things, in order of certainty:
CIrun onmain(46275295773,c22a0a732) has nomacosjob at all - onlymacos-python.So the job runs for these pull requests (it is the MoltenVK GPU job, which the path filter only brings in when the change touches the shader
or translator side) and there is no main-side equivalent to compare against in the same run.
ps_exp_f32_denorm_rt(the runner's GPU returns exp2(-125) two ulps low; needs a device to …)". That is a precision difference on the CImachine's GPU, not a shader produced by this diff - and this diff changes the replay of indirect records, not exp or denormal arithmetic.
So: not attributable to this change by comparison, and consistent with a known runner effect - which is weaker than "it is not mine", and I would
rather say it that way. If a maintainer wants it settled, the decisive check is the same job on
mainwith a change that touches those paths,or a re-run of this job: a precision failure two ulps wide should be stable across re-runs if it is the hardware, and intermittent if it is not.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T15:47:07Z.
Re-verified against today's
main, not just the base it was rebased onto: I mergedorigin/main(38719cc36) into the branch locally, rebuiltd3d12_draw_testfrom that tree, and ran the pull request's own test:Why it was worth doing:
mainchangedruntime/shims/d3d12_vulkan_device.cppby +15/−1 since this branch was cut, so the file this change lives in isnot the one it was tested against. The three changes there are unrelated to indirect replay - a sparse tile heap now prefers device-local memory
without requiring it, and two
needs_maintenance8refusals with their reasons - and the merge is clean, which is why the test passing is not asurprise, but "not a surprise" is not a measurement.
For the record on the other three of my open pull requests, I checked the same thing and none of the files they touch changed on
mainbetween
51d343b86and38719cc36(tools/awc_opus.py,tests/test_awc_opus.py,docs/design.md,scripts/build_llvm_mc.ps1), so theirearlier verifications still hold and they do not need another run for this reason.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T16:44:51Z.
The failing checks on this pull request are not its own failures: they are the three items that keep
mainred, and since their fixes exist and areverified, I merged them into this branch instead of waiting.
check,stdlib-tests-linux,macos-pythontests/test_text_encoding.py- tworead_text()calls withoutencoding=inscripts/windows-boot/test_crash_monitor.pytranslator-teststests/test_mesh_serial_waves.py- the slot stores becameOpBitcastafter #850 (#2506'slower_addr64) and the test counted onlyOpConvertUToPtrsemantic-tests (ubuntu-latest)tests/semantic/test_interp_computed_ij_fallback.py- the oracle predates the toward-zerop2narrowTwo things about how it is done, because they change how this lands:
Bloh09andZackand are merged unchanged, authors intact; this branch only adds them on top, so if their items reachmainfirst the whole thing collapses to a no-op instead of conflicting;mainearlier, so this is not a new risk introduced by this diff.The branch was also re-verified end to end after the merge, including the GitHub Actions tree on the current
main: the runtime test this pull requestis about still passes (
compound DRAW_INDEXED x2 …: 1536 lit pixels, 0/4096 mismatches, exit 0) andtests/test_awc_opus.pystill passes (OK).What this does not fix: the
macosjob, which fails onps_exp_f32_denorm_rt. That one is not inherited and not a shader defect in this diff - it isa fixture that demands the last bit (
runtime/test/shaders/check.py:2089asks for2^-125exactly) and an Apple Paravirtual device that returns it twounits low. Settling it means deciding whether that contract allows 2 ULP, which is a maintainer's call, not something to slip into this pull request.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T20:36:38Z.
The only failing check on this pull request is
macos, and it is not from this diff: it isps_exp_f32_denorm_rt, where the fixture demands the exact bit pattern of 2^-125(
runtime/test/shaders/check.py) and the runner's Apple Paravirtual device returns it two ulps low.I opened #2635 (a draft) with the shape of a fix: a two-ulp tolerance confined to the
OpExp2channel, with zero kept exact and the channels the shader computes itself left bit-exact. Itis a draft because it changes a test's contract and none of us can verify it without a MoltenVK device - but if the maintainers accept it,
macosstops being red for this pull request and forevery other one in the queue.
Everything else here is green: 8 checks SUCCESS,
macosthe only failure.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T03:54:19Z.
Two things a reviewer should know about the red check here, both measured rather than assumed:
The branch merges cleanly into
main.git merge-tree --write-tree origin/main <branch>reports no conflict, and the pull request isMERGEABLE. Nothing about this change blocks a merge.The
macosfailure is from an older base. It is not produced by this diff: onmain1d22590b9themacosjob passes (the only failing job there issemantic-tests, the interp oracle). When I rebased#2650,#2652and#2634onto the currentmain, that job came backSKIPPEDon all three and those pull requests went green without a line changing. So a maintainer can merge this as it stands, or the author can refresh the branch with one rebase - either way the red disappears without touching the change.What stops me from doing that rebase for you: replaying the commits onto current
mainconflicts in documentation, not in code -docs/d3d12_vulkan.md;#1923,README.md, where the branch restructures the requirements block thatmainhas since edited.Resolving that means choosing which structure the documentation keeps, and that is the author's decision, not mine. The merge itself is clean, so the conflict is only in the replay.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T04:15:20Z.
Rebased onto current
main(1d22590b9) and the rebase was clean this time - which corrects something I wrote yesterday: the conflicts I reported (docs/d3d12_vulkan.mdhere,README.mdon #1923) were in my stale local copy of the branch, not in the branch the pull request shows. The synced head rebased without a single conflict, and I have learned to checklocalagainstforkbefore drawing conclusions about a pull request.Verified after the rebase, on this branch:
The
macosred should now come off with the base: onmainthat job passes, and on the four pull requests I rebased today it came backSKIPPEDand took the red with it.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T11:01:26Z.
Rebased onto current
main(012b79a67) after it started conflicting this morning. Head is nowb658b8c3f, three commits, andmerge-treeis clean again.Why it needed it:
runtime/shims/d3d12_com.cppis one of the filesmainchanges most - three commits touched it since this branch was cut (399a5eabdsample-mask slot,091bfa8d4pending_stream/eviction,1aefed0dapresent_mutex deadlock). The conflict was 18 lines, one block, at the compound-signature branch ofExecuteIndirect.What the conflict actually was, and how I resolved it:
mainexpand_compound_indirect), then resetmain's API:list_.closed()->list_->closed()That last line is the whole subtlety:
mainmovedlist_to astd::shared_ptr, so the branch'slist_.closed()would not compile. Everything else in the branch applied without a manual edit.Verified after the rebase, on this machine (Windows 11, MSVC 19.44.35226):
One commit disappeared in the rebase, and it was correct:
test(semantic): align computed-I/J f16 interp oracle with toward-zero p2 narrowis nowc717967d0inmain, so the rebase dropped it as already applied. Three commits remain: two doc commits and the replay change.What I did not re-verify: the semantic test the branch carried (it is in
mainnow) and the GPU readback paths. The seven tests above are the CPU-side ones this branch owns.If you would rather I had not pushed to the branch, say so and I will leave rebases to you - the fork head is
fiestorra/leonida-carryand I can revert it toa9c0b786a.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T11:40:32Z.
The
windowsfailure on this branch is not this branch's fault: it isdisplay_white_cache, a flaky test inmainthat I reproduced on the currentmainand fixed in #2713.The CI log says:
And on
maind367675c7, on this machine:Why:
DisplayWhiteCache::get()wakes the worker and then readsvalue_:so whether the first call returns 0 or the freshly read value is a scheduling fact. The test asserted 0 unconditionally.
Timeline for this branch, which is what made it look causal: the previous head
a9c0b786ahadRuntime successat 04:15, and the rebased headb658b8c3ffailed at 11:01 - on a test that touches none of the files this branch changes. #2713 relaxes that one assertion and keeps thereads()checks, and it is green on this machine over 60 runs under load.What I would do with the red check here: re-run it. It will pass most of the time, and #2713 removes the coin flip for everyone.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T15:54:24Z.
A second correction to this body, found by auditing the version strings in it against the machine rather than trusting them. Two were wrong, and one of the two was the GPU.
1.
MSVC 14.44was wrong. The compiler on this machine is:2. The "GPUs tested" line named a GPU that did not run the tests. It said
AMD Radeon(TM) Graphics (gfx1036 iGPU), driver 32.0.21045.29003, and that string is a real adapter on this machine (Win32_VideoControllerreports it) - which is what made it plausible. But the Vulkan adapter that actually executes a replay here is the discrete one:So
gfx1036is the RDNA2 target the shaders are written for and the replay emulates, not the device that ran them, and32.0.21045.29003is the integrated adapter's string. The line now says both things explicitly.What this does not change: this pull request's tests are CPU-side (
d3d12_draw,d3d12_stateful_indirect_pixels), so no GPU was required for the result - which is exactly why the wrong line was possible: it described a field nobody needed to check for the claim to hold.The pattern, third time today: a number is plausible exactly when it matches the machine's shape -
14.44next toVS 2022, an AMD adapter on a machine that has one. A wrong number that looks right is what a model produces when the field is optional; the only defence is running the command that prints it. The commands are in this comment.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T20:44:48Z.
Re-running the CI with an amended commit (
6ae77b015, same tree), because the red onwindowsis a flaky test inmainthat this branch does not touch and I cannot ask GitHub to re-run it.The red, for the record:
11 - display_white_cacheat headb658b8c3f, with the messageFAIL: the first get() has no value yet (the caller falls back to 203).That assertion is not an invariant of the cache:
DisplayWhiteCache::get()wakes the worker and then reads the value, so whether the first call returns 0 or the freshly read value is the scheduler's decision. Measured onmaind367675c7: 1 failure in 30 runs with four CPU hogs, and the same assertion. Fixed in #2713 (green on thewindowsjob, 60/60 locally, plus a mutation control showing the relaxed assertion still fails on a broken cache).Why an amend instead of a re-run:
gh run rerunanswers "Must have admin rights to Repository" for this account. Pushing new commits does start a run, so the options were an empty commit, a rebase onto amainthat has moved 77 commits, or an amend. The amend is the only one that changes nothing about the branch:git rev-parse HEAD^{tree}is identical before and after, and the diff is still the same five files.What I expect: the same five files, and
windowsgreen - the flake fails about 1 run in 30, so a single re-run is likely to pass and is not proof that it will always pass. The proof is #2713 landing.What this does not fix: if the re-run comes back red on
display_white_cacheagain, that is the flake beating a 29-in-30, not this branch. The job to watch iswindows, and the test to look for isdisplay_white_cache, not the compound-signature tests.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T20:57:27Z.
Green, all of it, at
6ae77b015:What that does and does not mean, said before anyone reads it as proof:
display_white_cachedid not fail on this run, and every other test in thewindowsjob passed with this diff in the tree - the compound-signature tests this PR adds included.display_white_cacheis fixed. The failing assertion is a race in the test:get()wakes the worker and then reads the value, so the first call returns0or the freshly read one depending on the scheduler. Measured onmaind367675c7: 1 failure in 30 runs with four CPU hogs. A 29-in-30 pass is what a green run looks like whether or not the race is still there.windowsjob, 60/60 locally, and carries a mutation control showing the relaxed assertion still fails on a cache that does not refresh.So the state of this PR is: ready, with one known flake in the tree it lives in, waiting for #2713 to remove the second half of that sentence.
The amend that produced
6ae77b015changed nothing but the commit object -HEAD^{tree}is identical tob658b8c3f- and the diff is still the same five files:Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:39:50Z.
Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (
d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools,d3d12/, or general docs), please feel free to reopen it.Pull request closed