runtime: capture slot 57 attachment formats for profiles #3738
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!3738
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3736"
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?
@lambirou on GitHub · 2026-12-01 13:18 UTC · original
lambirou:codex/mesh57-attachment-capture-clean→main· +116 −5 · 6 files · 6 commits · openX2W_MESH57_CAPTURE_STATE=1archived the slot 57 state blocks inreq_<variant>.s57, but not the render-target and depth formats bound atthat draw.
tools/startup/mesh57_profile_draft.pyreads those from anadjacent
.t57sidecar, so a color capture could only be reviewed as adepth-only profile and no color profile could be built from the title.
The capture now writes
req_<variant>.t57immediately before.s57, inone
targets <N> <fmt...> dsv <fmt> writable <0|1> samples 1 0line withdecimal DXGI formats. It is written only when the bound attachments are
single-sample and at least one target or the DSV has a known format; an empty
or multisample bind writes no sidecar and keeps
.s57as the archive. Thefixture binds
R8G8B8A8_UNORMandD32_FLOAT_S8X24_UINT, checks the exacttuple against its own formats, and covers the depth-only, empty and
multisample controls.
Validation (Windows, Release):
ctest --preset release --no-tests=error -R '^(native_fixed_mesh57(_mrt)?_(warp|hardware)|startup_indirect_mesh_(warp|hardware))$'— 6/6 pass, including AMD Radeon RX 9060 XT.
python -B tests/mesh57_profile_draft_check.py— pass.python -B tests/docs_links_check.py— pass.Refs #3499
Refs #3726
@R0D4X on GitHub · 2026-12-01 16:59 UTC · original
Reviewed the diff of #3738 against
tools/startup/mesh57_profile_draft.pyand #3504 (now also unstacked onto currentmainin #3763).While the
native_fixed_mesh_fixturecheck on therealdesktop pipeline path is a nice touch, this implementation has a few correctness gaps compared to #3504 / #3763:publish_shader_request(..., L".t57", ...)usesMoveFileExW(..., 0)(fail-if-exists) andrequest_slot57_meshruns only once per(pipeline, root)before releasingfixed_ms/fixed_ps. If the same slot 57 variant is later drawn with different RTV/DSV formats or DSV writability, later tuples are silently dropped instead of recorded.mesh57_profile_draft.pyrelies on multiple tuples /overflowin.t57to refuse ambiguous variants rather than drafting a wrong profile..t57for the base slot-57 variant:request_slot57_meshwalksinfo->path == 55up to its base slot-57PipelineInfoand publishes.t57under the base variant key using the derived pipeline's bound attachments.dsv 0 writable 0: Inlist_targets, when a non-null depth handle maps to no desktop descriptor (!resolved),pass.targets_boundis still set totruewithpass.dsv_format == DXGI_FORMAT_UNKNOWN(the same SHOULDlukaslw-labflagged on #3504).mesh57_attachment_tuplechecks!= DXGI_FORMAT_UNKNOWN, but does not check!x2w_view_dimension::typeless(...)on the RTVs or DSV.samples 1 0: Writes.t57synchronously underrequest_lockon the draw thread and drops multisample binds instead of recordingsamples <count> <quality>.#3763 unstacks #3504 (
4991e866, keeping Leyukaka's authorship) onto currentmain, preserves the cache-index tracking inpublish_shader_request, fixesdepth_unresolved, and covers multi-RTV order, sample-count mismatch, unresolved depth, and derived slot-55 refusals on WARP and hardware.@R0Y00 on GitHub · 2026-12-01 17:06 UTC · original
Please add a capture case where the first request for a pipeline/root has no attachments, then the same pipeline/root draws with valid single-sample attachments. The current request cache compares only the pipeline and root, and the sidecar key excludes the attachments. That can keep the later tuple from being published. The case should also show how the reader handles two attachment tuples for the same variant.
@SimSalabimse on GitHub · 2026-12-02 11:51 UTC · original
Windows test at
ef67e5e9, 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.6/6 passed, 0 failed, 0 skipped:
startup_indirect_mesh_warp,startup_indirect_mesh_hardware,native_fixed_mesh57_warp,native_fixed_mesh57_mrt_warp,native_fixed_mesh57_hardware,native_fixed_mesh57_mrt_hardware.Both passed.
On the requested capture case (a first request for a pipeline/root with no attachments, then the same pipeline/root with valid single-sample attachments): this head does not include that sequence. The fixture checks the
.t57tuple against the formats it bound, and it unit-testsmesh57_attachment_tuple()for a depth-only bind, an empty bind (no sidecar line), and a multisample bind (no sidecar line). It does not run a first-empty-then-valid capture on one pipeline/root, and it does not show how the reader handles two attachment tuples for the same variant.AI-Assisted
@lambirou on GitHub · 2026-12-02 14:45 UTC · original · reviewed
Reviewed
ef67e5e9; read the capture helper and the slot 57 publication path, not built here.Verdict: approve. The attachment tuple is captured only for single-sample binds, is written before the
.s57archive, and returns an empty tuple rather than inventing an unknown format. The fixture checks the exact sidecar text and the MRT/DSV case.writableis encoded ascapture.writable && dsv ? 1 : 0. That is correct today because an unknown DSV cannot be writable, but the truth table is implicit. A one-line comment or an explicitdsv != DXGI_FORMAT_UNKNOWN && capture.writablewould make the invariant clear..s57write can leave an orphan.t57. The reader keys on.s57, so this is harmless; a cleanup on failure would keep the cache tidy.target_count > 8is rejected; a target or DSV withDXGI_FORMAT_UNKNOWNproduces no tuple; thesamples 1 0fields match the single-sample contract;request_slot57_meshskips the archive when the tuple write fails, so a reader never sees a mismatched pair.The PR is independent of the Mesh86 stack.
ef67e5e99bto6f04c589b8@R0Y00 on GitHub · 2026-12-02 14:55 UTC · original · requested changes
The asynchronous path drops the archive when an attachment tuple is present.
request_slot57_meshsubmits.t57and.s57in separatepublish_mesh_requestcalls with the same variant.RequestPublisherdeduplicates by key rather than extension, so the second call returns success without enqueuing.s57. I reproduced this with MSVC and the publisher header from6f04c589: two enqueues produced one write (.t57) and one repeat. A single enqueue containing both ordered parts produced both writes. Please enqueue both parts together and verify the fixture with the default asynchronous publisher. The earlier no-attachments-to-valid-attachments case also remains uncovered, since the request cache still compares only pipeline and root.@R0Y00 on GitHub · 2026-12-02 15:26 UTC · original · reviewed
I checked
ce71cda0. The new test setting forcesX2W_SYNC_MESH_REQUESTS=1, which exercises the synchronous negative control. With the default async setting, the twopublish_mesh_requestcalls still use the same deduplication key. The independently reproduced result issplit: 1 writes, repeats=1; paired: 2 writes, repeats=0. Please enqueue.t57and.s57as one request (in that order) and keep a regression on the default async path. The attachment-change coverage requested in the earlier review still applies.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.