Repository navigation
Conversation
|
One thing in A fill at record time is what the tests do, so they don't show it. AI-assisted (Claude Code, Claude Opus 5.5). |
1acc285 to
137e2d1
Compare
|
Rebased onto Verified after the rebase, not before: built Written with an AI assistant. |
Independent Testing Results — PR #1937PR #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
Both 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.
No VUID messages were captured in the compound-fixture logs. Validation findingsThe following tests emit
The 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 checksNo 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. |
137e2d1 to
cdeac21
Compare
|
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 I have documented the timing rather than implemented the deferral, and pushed a commit for it: I did not do the deferred expansion in this PR, and I want to be explicit about why rather than hide it behind scope: 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
Still open, not addressed here: the expansions that no test exercises (the non-indexed 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
So neither red job is the compound replay. The Written with an AI assistant. |
|
Updating my own message: when I wrote it,
That test is not this branch's: it is an XDXR postbuild read-back under What I could not do, and say so rather than imply otherwise: compare against a completed If a maintainer wants the proof to be direct, one Written with an AI assistant. |
|
Current main For a combined candidate, run |
|
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 My position for the combined candidate: the creation guard should refuse only the shapes that cannot be replayed, and those are already the ones
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: Written with an AI assistant. |
3d1dadb to
8d36e84
Compare
|
Rebased onto current What the overnight CI drained to, on this branch and on the other three we have open:
New head after the rebase: So: one red job is the repository's ( 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,
The failure in the middle row is the guard, in its own words:
So the narrowing I would take, in the guard #1737 adds: if (desc->NumArgumentDescs > 1) {
const D3D12_INDIRECT_ARGUMENT_TYPE last = desc->pArgumentDescs[desc->NumArgumentDescs - 1].Type;
if (last != D3D12_INDIRECT_ARGUMENT_TYPE_DRAW && last != D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED) {
log_once("CreateCommandSignature refused (not implemented): arguments before a dispatch, "
"first argument type", int(desc->pArgumentDescs[0].Type));
return E_NOTIMPL;
}
}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. The built candidate is pushed as 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 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, 1. Creation time, every shape #1737 refuses, on four treesProbe: #1737's own
So the guard's premise — "accepted, their bytes would be read as the draw's arguments" — is true of 2. Execution, the six
|
| tree | result |
|---|---|
main (no replay) |
2/6 fail: d3d12_stateful_indirect_pixels and ..._nonindexed_pixels, indirect pixels line 184: recorded.size() == (scenario == 0 ? 4u : 2u) |
main + #1737 |
same as main (the guard does not change what executes) |
main + #1937 |
6/6 pass |
main + both |
0/6, all at SUCCEEDED(device->CreateCommandSignature(...)) with arguments before the draw or dispatch, first argument type 3 |
main + both, narrowed to dispatch |
6/6 pass |
A detail worth knowing: with main's own copy of that test file, main passes 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 on main but invisible to main's own assertions.
3. What the replay decodes, so the narrowing does not just move the silent case
expand_compound_indirect decodes VERTEX_BUFFER_VIEW, INDEX_BUFFER_VIEW, CONSTANT_BUFFER_VIEW, SHADER_RESOURCE_VIEW, UNORDERED_ACCESS_VIEW, CONSTANT and 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, a CONSTANT outside D3D12_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
ctest on the narrowed candidate: 491 tests, 489 passed, 2 failed — xbox_present and d3d12_set_descriptor_heaps. Both fail identically on main and 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 (
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 The fixture that would catch it is the one you cite, 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
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:
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)
Run 2 (lot 4 bis)
All runs
AI-assisted (Claude Code, Claude Opus 5.5). |
Windows 11 + RTX 3090 Verification (
|
8d36e84 to
c6c6d52
Compare
|
Rebased onto current Conflict: one paragraph in Verified after the rebase, on this machine (RTX 4090, 32..32 subgroups):
That matters because the earlier discussion in this thread ended with a landing-order question against a much older Not re-run: the full 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 Measured, both sides from CI rather than from a local run:
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 The state before the rebase was different and worth remembering: the same jobs were red then too, but the branch was also Written with an AI assistant. |
|
AGENT-MSG | 2026-11-29 14:00 UTC | merzleckeier | AI-assisted: Codex BASE: The additional synthetic fixture adds an upload count buffer with This also gives a GPU readback for the documented timing limit. Changing only that DWORD after Run the fixture with |
c6c6d52 to
aa2ede8
Compare
|
Heads refreshed:
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 One thing I cannot state: GitHub was still recomputing mergeability when I pushed ( Written with an AI assistant. |
|
A note on the The failure is Two things, in order of certainty:
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 Written with an AI assistant. |
|
Re-verified against today's Why it was worth doing: 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 Written with an AI assistant. |
…e paired forms, switches by turns Picture: - Cutscene faces with only their eyes and teeth since the LDS bounds: the 25 face programs (the face network's operations, the normals rebuilt from blend shapes) keep their LDS accesses unbounded, by name and in the cache's key (LEONIDA_LDS_BOUNDS_EXEMPT; trustno1-coder 9eb44fa6, Victorywillbeours222). Six of them run in the waterside tour. - Copies and resolves into textures the title fills go back into title memory once their list has run, only the subresources written and of them the 4 KiB pages that change (LEONIDA_COPY_BACK, on; voidopcode/vilocity ee93826): a view the title places over that memory was made from bytes the copy never reached (faces in blocks of colour, clothes in another texture's). 9,216 copies (52 MB) in a run of 8 minutes; by turns the frame's median -0.33 +-0.50 and +0.34 +-0.25 ms. - A list's prelude leaves out its upload of a texture another list wrote on the host GPU and submitted first (LEONIDA_UPLOAD_GUARD; trustno1-coder e530c003, aventureroestelar-source), noted only while the texture is still the title's. - A texture asked for as reserved (levels on demand) is no longer cut from the pool, where it was never reserved and was made whole again (aki-gta6/aki-runtime ad214cd, KeethSmith). - The launcher names all 33 programs the chain gave an approximate form in LEONIDA_PAIRED_FOR (timing runs d39: 1.98 ms of card a frame against 2.31 for the eleven before; tours d37, d38 with nothing broken), and keeps device-removed data to the faulting address (d35: the card 83 % busy against 89 % with breadcrumbs, the frames alike). Shader translator (one re-translation): global stores count as UAV writes for early depth (trustno1 788fe236); a sum of high halves is not taken for a wave reduction (Bebrik229); SDWA sign-extended selects; mesh loops leave at their own exit at the limit instead of a `ret` (LEONIDA_MESH_LOOP_EXITS, trustno1 6bbb6bca); readers indexed once per lowering (trustno1 7cc0d153, 101Leafy); raw FSSM records (XDAT 0x0c) read (fuzeofficial, via MiniVI 96e788c7). Submitting thread, by turns of 4 s standing (runs d41, d43): - Two lock passes, off by default (`=1` on): slot writes past the heap's lock of placed views (LEONIDA_SPANS_QUICK; Belobug a284ca7 via readmet3xt 96dfd9bb8, trustno1 #1937) and the texture queue's lock spared by marks (LEONIDA_QUEUE_MARKS; readmet3xt-lab b377071). Here no one waited for those locks: the submitting thread +0.12 to +0.30 ms a frame with them. `crate::asked!` is `toggled!` off by default. - 8 parts joined against 2 (LEONIDA_JOIN_PARTS_AB): with 8 the frame -3.09 +-0.51 and -3.03 +-0.26 ms, so the launcher's 8 stays. The write-watch asking joined across 8 MiB against 256 KiB (LEONIDA_ASK_GAP_KB, _AB): with 8 MiB the card -1.08 +-0.50 and -1.14 +-0.22 ms busy. AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64: the named unit tests of each port (shader 12, gpu 11, texback and resource 36), a warm-up start (the same three programs refused as before, no device removed), the turns above and recorded tours. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The failing checks on this pull request are not its own failures: they are the three items that keep
Two things about how it is done, because they change how this lands:
The branch was also re-verified end to end after the merge, including the GitHub Actions tree on the current What this does not fix: the Written with an AI assistant. |
5aa64f3 to
15857fe
Compare
|
The only failing check on this pull request is I opened #2635 (a draft) with the shape of a fix: a two-ulp tolerance confined to the Everything else here is green: 8 checks SUCCESS, 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 The What stops me from doing that rebase for you: replaying the commits onto current
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. |
15857fe to
a9c0b78
Compare
|
Rebased onto current Verified after the rebase, on this branch: The Written with an AI assistant. |
…TATE-REPLAY) The compound branch of ExecuteIndirect reset the bindings a signature writes and recorded no draw, so a signature whose records carry vertex buffer views, an index buffer view or root arguments bound nothing. Vulkan has no indirect call that rebinds state and the replay's Draw carries one state snapshot, so expand each record in the command list into the state calls it stands for and the DRAW or DRAW_INDEXED that follows, when the argument and count buffers are host-visible. A device-local buffer keeps the reset-only path. The bindings the signature writes are still reset after the call, as D3D12 does. Written with an AI assistant.
Snooozs (with reason): the expansion reads the argument and count bytes while ExecuteIndirect is recorded, while D3D12 reads them when the list executes, so an application that rewrites a host-visible argument buffer between the two - a ring buffer filled just before ExecuteCommandLists, or a list reused with a new buffer - replays the records that were there at record time. The description and the docs stated the host-visible restriction but not this one, and the fixture fills at record time, so it cannot show the difference. A sentence in the same paragraph, with the deferral named as what would match the runtime's timing.
a9c0b78 to
b658b8c
Compare
|
Rebased onto current Why it needed it: What the conflict actually was, and how I resolved it:
That last line is the whole subtlety: Verified after the rebase, on this machine (Windows 11, MSVC 19.44.35226): One commit disappeared in the rebase, and it was correct: What I did not re-verify: the semantic test the branch carried (it is in If you would rather I had not pushed to the branch, say so and I will leave rebases to you - the fork head is Written with an AI assistant. |
|
The The CI log says: And on Why: if (!wanted_.exchange(true)) { … read_now_ = true; wake_.notify_all(); }
return value_.load();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 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. 2. The "GPUs tested" line named a GPU that did not run the tests. It said So What this does not change: this pull request's tests are CPU-side ( The pattern, third time today: a number is plausible exactly when it matches the machine's shape - Written with an AI assistant. |
… signature is guarded only when its bytes are not mappable
b658b8c to
6ae77b0
Compare
|
Re-running the CI with an amended commit ( The red, for the record: That assertion is not an invariant of the cache: Why an amend instead of a re-run: What I expect: the same five files, and What this does not fix: if the re-run comes back red on Written with an AI assistant. |
|
Green, all of it, at What that does and does not mean, said before anyone reads it as proof:
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 Written with an AI assistant. |
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.