d3d12: replay a compound signature's vertex/index buffer views and root arguments (D3D-INDIRECT-STATE-REPLAY) #1937
Closed
leonida/mandy
fiestorra wants to merge 0 commits from
carry/indirect-state-replay into main
pull from: carry/indirect-state-replay
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!1937
Loading…
Reference in a new issue
No description provided.
Delete branch "carry/indirect-state-replay"
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?
Pull request closed
This pull request cannot be reopened because the branch was deleted.
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.
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).
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.
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.
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.
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.
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.
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.
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.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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.