startup: implement next command-list slot in d3d12_xs_device (Part of #870) #2067
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!2067
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2067/head"
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?
@tedin7 on GitHub · 2026-11-24 23:57 UTC · original
tedin7:x2w-870-next-slot→main· +282 −0 · 7 files · 3 commits · closed without mergingPart of #870
What this unblocks: a title that binds stream-output buffers (command list slot 49, SOSetTargets) no longer falls to the no-op stub, so later draws can start using the bindings.
Records up to four stream-output views per list (desktop SOSetTargets order, slot 45 + 4). A null view array unbinds the named slots. A call that does not fit in four slots, or an unreadable array, is refused and logged, and the old bindings stay. Draws do not write stream output yet. The rules live in
src/startup_stubs/stream_output_targets.h(no Windows types) with a unit test.Verification:
g++ -std=c++17 -Wall -Isrc -o /tmp/so_test tests/startup_stream_output_targets_check.cpp && /tmp/so_test(Linux host) ->startup_stream_output_targets: okgit diff --check-> cleand3d12_xs_device.cpp/d3d12_draw.inlchange is not compiled yet, and slot 49 has no call-site confirmation (it is the shifted desktop slot, between confirmed slots 48 and 50). Needs a Win2025 build andctest -R startup_stream_output_targetsbefore merge.AI-assisted; commands listed were executed locally.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-25 00:04 UTC · original · edited 2026-11-25 00:07 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
d9c37bdℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
@tedin7 on GitHub · 2026-11-25 13:39 UTC · original
Fixed in
fb61f453: SOSetTargets at slot 49 is now opt-in, and the test now drives it through the production list vtable entry instead of the container alone. Head is nowef331bde(main merged in).Windows Server 2025 WARP at
ef331bde:AI-assisted; commands listed were executed locally.
@Makto94 on GitHub · 2026-11-25 16:38 UTC · original
Hardware run and Windows 11 MSVC build at head
ef331bde.Environment: Windows 11 Pro build 26300.9974, Debug (
devpreset), MSVC 19.44.35230.0 (cl 14.44.35207), driver 32.0.16.2101. The test does not print the adapter name; the only hardware adapter in this machine is an NVIDIA GeForce RTX 3070 Ti. The D3D12 debug layer was off (X2W_D3D12_DEBUGnot set). The runs were serial (-j1); the hardware run was on an idle machine.Build:
cmake --build --preset devexited 0. No warning comes from the files changed by this PR.Tests:
ctest --preset dev --no-tests=error -j1 -R 'startup_stream_output' -E 'hardware' -V: 3/3 passed (startup_stream_output_slot_warp_on,_warp_off,startup_stream_output_targets).ctest --preset dev --no-tests=error -j1 -R 'startup_stream_output_slot_hardware' -V: 2/2 passed (_hardware_on,_hardware_off). 0 capability skips (77).Slot 49 (
SOSetTargets) withX2W_D3D12_SO_TARGETS=1: start 1, count 2 binds 2; start 3 count 2, start 4 count 1 and start 0 count 5 are refused;GetDeviceRemovedReasonreturns 0; the test printsstream output slot 49 (on): bound 2 of 4, device OK. Without the variable the call reaches the no-op stub and the test printsbound 0 of 4, device OK. The_warp_*and_hardware_*tests print the same lines.Not covered by this run: draws that consume the bindings.
@tedin7 on GitHub · 2026-11-25 16:43 UTC · original
Thanks @Makto94, this is a useful hardware data point for head
ef331bde.It confirms on an RTX 3070 Ti (Windows 11, MSVC 19.44, Debug) what the WARP runs showed: slot 49
SOSetTargetswithX2W_D3D12_SO_TARGETS=1binds the valid range (start 1, count 2) and refuses the three out-of-range calls without removing the device, and with the variable unset the call stays on the no-op stub. 5/5startup_stream_output*tests passed, 0 capability skips.Agreed on the gap you note: no draw consumes the bindings yet. That belongs with the slice that wires stream-output draws, not this one.
AI-assisted; commands listed were executed locally.
@tedin7 on GitHub · 2026-11-25 18:30 UTC · original
@R0Y00 the changes you requested are addressed on the current head
ef331bde4d7153e962c67db1a4f4bddb0e37de37(see our reply above). Could you re-review, or dismiss the change request if it is resolved? Under the new scope, MasterDomino can then review and merge it.AI-assisted; commands listed were executed locally.
@tedin7 on GitHub · 2026-11-25 21:33 UTC · original
Closing this PR for now so we can focus on the test-speed work. The branch stays as it is, and review comments here remain valid.
We will reopen it later, bring it up to date with
main, re-run the Win2025 WARP checks at its head, and post the result here.AI-assisted; commands listed were executed locally.
@R0Y00 on GitHub · 2026-11-25 12:34 UTC · original · requested changes
The four-slot unit test checks the container, but the production vtable entry at slot 49 is still inferred from desktop ordering. Please keep that binding opt-in until there is independent evidence for the slot and argument shape. A source-built Windows call through the shim should distinguish bind, partial unbind and rejected ranges, with the retained state checked after rejection. Keep the wording scoped to recording the bindings until draw actually consumes them.
Pull request closed