startup: record bound slot 57 targets with the creation capture #3504
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!3504
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3502"
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?
@Leyukaka on GitHub · 2026-11-29 18:34 UTC · original
Leyukaka:diag-mesh57-bound-targets→main· +672 −124 · 11 files · 6 commits · draftRefs #3418
Stacked on #3495: until it merges, this PR also shows its commits. Only the last commit (
4991e866) is new.Why
A reviewed slot 57 profile needs the desktop render target formats, the DSV format and the sample count and quality. The creation capture written under
X2W_MESH57_CAPTURE_STATEdoes not contain them. The views bound when the indirect mesh call executes do.What
Under
X2W_MESH57_CAPTURE_STATEonly, a matching-root slot 57 indirect mesh call (placeholders included) records the bound attachments inreq_<16-digit-variant-hex>.t57, next to the.s57archive and with the same stem.One LF-terminated line per distinct tuple:
Example:
targets 1 29 dsv 55 writable 1 samples 1 0.0with writable0means no depth view is bound.overflow <observations>line that counts observations outside the retained set, repeats of an unretained tuple included.Switch off: no work, allocation, file I/O or new lock. One environment lookup per indirect mesh call with a placeholder pipeline remains.
Switch on: the draw path adds no lock and does not wait for disk. It queues a value copy (variant, formats, samples, paths) to a background writer, capped at 256 outstanding items. A declined submit is retried on a later draw. The file is replaced atomically. Writes are best effort: a saturated queue or process exit can leave observations unpublished.
docs/startup-runtime.mddocuments the switch and the sidecar.Tests
Two new CTests per backend,
startup_indirect_mesh57_targets_<backend>andstartup_indirect_mesh57_targets_off_<backend>, reuse the existing fixture binary. They cover duplicate binds, a format change on one recording, typeless color and depth resources with typed views, DSV writability, capture across recordings, overflow and the switch-off case.14/14 passed, no skips, on WARP and on hardware.
Mutations, each built and run against the two new WARP tests, all killed:
overflow 1writable 0instead of1Not covered
The profile tool does not read
.t57yet. That is a follow-up.@lukaslw-lab on GitHub · 2026-11-30 07:00 UTC · original · approved these changes
Reviewed
4991e866(own commit over #3495196adf8c) by reading the diff; not built or run. Draft PR.Verdict: approve. The switch-off path is inert and the sidecar writer is careful. One SHOULD can follow before the profile tool reads
.t57. No MUST.list_targetsbinds no depth for a handle that maps to no descriptor (d3d12_xs_device.cpp:4480-4484) but still setstargets_bound(:4532), socapture_slot57_targetsrecordsdsv 0 writable 0, a tuple the title never bound. A reviewed profile built from it would drop the depth attachment. Adepth_unresolvedflag onPass, checked next tod3d12_draw.inl:1013, would keep runtime misses out.rtvs[i]copy), a sample-count mismatch refusal and the derived slot 55 "no tuple" rule are untested. A two-RTV observe would catch an order bug cheaply.requested_mesh_variantstays empty, so neitherlist_targets:4533nor the capture does any work. The env lookup moved before therealcheck, as the PR body says.fixed_mesh_capture_variantis written and read underrequest_lock. The return value is built before the guard is released.bound_targets[i]cannot be null oncetargets_boundis set (:4464-4470).Pass{}resets the new fields per recording.FreeLibraryWhenCallbackReturnspins the DLL. The 2048 B read limit is well above 8 tuples plusoverflow. A malformed file is left untouched.publish_request_filerefactor keepspublish_shader_request's old result formove_flags == 0.Tests:
startup_indirect_mesh57_targets_<backend>proves view formats (28/29/30 from typeless resources), dedupe, rebind, DSV writability, reuse across recordings after the request is released, andoverflowcounting._off_proves no.s57/.t57is written. CI'sprfilter (CMakePresets.json) does not include either name, so CI did not run them. Only the author's local 14/14 (WARP + hardware) covers this head.@SimSalabimse on GitHub · 2026-12-02 11:51 UTC · original
Windows test at
4991e866, tested at this head without merging main.Windows 11 Pro (10.0.26200), NVIDIA GeForce RTX 4070 Ti, driver 621.35, MSVC 19.44.35230,
--preset dev,-j 1.14/14 passed, 0 failed, 0 skipped:
startup_indirect_mesh_request_warp,startup_indirect_mesh57_targets_warp,startup_indirect_mesh57_targets_off_warp,startup_indirect_mesh_request_hardware,startup_indirect_mesh57_targets_hardware,startup_indirect_mesh57_targets_off_hardware,native_fixed_mesh57_warp,native_fixed_mesh57_mrt_warp,native_fixed_mesh57_hardware,native_fixed_mesh57_mrt_hardware,native_fixed_mesh57_depth_only_warp,native_fixed_mesh57_depth_only_hardware,native_mesh57_outcomes_warp,native_mesh57_outcomes_hardware.AI-Assisted
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.