Repository navigation
startup: copy and resolve whole resources on a recording list (slots 15, 17, 19) - #1944
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e7b39dc483
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Merge-order check: these four PRs cannot all land in any order — one pair conflicts, the other three composeFour open PRs now add command-list behaviour to the same two files ( And the four-way merge conflicts on the same pair, at the shared The three that do compose, compose for realMerged #1975 + #1974 + #1972 onto git merge pr-1975 pr-1974 pr-1972 # 0 conflicts
cmake --preset dev # Generating done
cmake --build --preset dev --target startup_root_constant_store startup_list_dispatch_check startup_clear_uav
build exit 0
ctest --preset dev -R 'root_constant|list_dispatch|clear_uav'
1/6 startup_root_constant_store ............ Passed 0.15
2/6 startup_clear_uav_warp ................. Passed 0.62
3/6 startup_clear_uav_hardware ............. Passed 4.03 (physical GPU, not a skip)
4/6 startup_list_dispatch .................. Passed 0.14
5/6 startup_list_dispatch_no-limit_control . Passed 0.03
6/6 startup_list_dispatch_no-state_control . Passed 0.02
100% tests passed, 0 tests failed out of 6So the command-list slots those three add coexist in one build, including both negative controls that #1974 registers. What this means for orderingNothing is semantically wrong with #1944 — it is a text conflict at a shared anchor. The practical consequence is that whichever of I did not resolve the conflict myself: the resolution depends on which PR the maintainer wants first, and inventing an ordering would Aside, same family#1951 and #1947 (the two Notes
|
|
WARP and hardware run of Result: 6/6 passed (
|
|
Fixed in 5bda1cf (all six review threads):
Verification: AI-assisted; commands listed were executed locally. |
5bda1cf to
0c60379
Compare
R0Y00
left a comment
There was a problem hiding this comment.
Independent Release test of 0c60379: all six existing cases pass, including WARP and RTX 4060 Laptop. One remaining source-path issue is outside those cases. sync_title_source returns success for a title-backed texture even when upload_texture cannot stage it; the handler can then copy an older desktop texture and mark the destination GPU-written. The upload-buffer branch also recopies into the same backing at command recording, without preserving bytes already referenced by a stalled submission.
Please keep the validated direct-resource and genuinely aliased source paths. For other title-backed sources either refuse while the upload is unavailable, or use a validated per-recording upload whose lifetime follows the consuming fence. A source-built missing/unreadable title input should leave the destination sentinel unchanged. If keeping the copied upload-buffer path, gate submission A, change its title bytes and submit B, then release and check both payloads. The current six cases remain useful and should stay.
|
Thanks. Fixed in dfadc46 (code in 0004422).
Verification (Windows Server 2025, WARP, default 3-slot pool, The upload-buffer refusal has no GPU case of its own yet; I only covered it through the docs and the shared refusal path. AI-assisted; commands listed were executed locally. |
…n, check heap direction and DXGI families - CopyResource/CopyBufferRegion refresh a title-backed source first (texture upload, upload-buffer map copy); title-backed default buffers are refused. - Copy and resolve destinations are marked GPU-written so a later draw does not re-upload stale title memory over them. - Placed buffers that do not start in COMMON and upload/readback buffers used in the wrong direction are refused. - Resolve format is exact against a fully typed endpoint; CopyResource accepts the remaining DXGI families (BC, R8, R16, R32G32, depth).
…drop the upload-buffer recopy A title-backed texture is copied from only when the draw path's upload staged it (or the GPU wrote it); otherwise the copy is refused and the destination is untouched. A title-backed upload buffer is refused instead of being rewritten while an earlier submission may still read it. Aliased placed buffers and direct resources are unchanged. Tests: staged and unreadable title-backed sources.
dfadc46 to
3f7b8a5
Compare
|
Independent Release check on I tried a focused local revision. Track unsubmitted writes on their recording, use them for reads on that list, publish the GPU-written state on submission, and discard the pending records on Reset or failed Close. For CPU-backed texture copy sources, take a fresh snapshot using the existing recording-owned upload and fence retirement path. The shared draw upload cache may reuse an earlier snapshot within one frame. With that revision, The slot 15 wording also needs an update. A local trace shows a 68-byte copy at a nonzero source offset between two non-aliased placed buffers. The source is UAV-capable. Please keep that case refused until there is a validated source of current bytes. The texture revision adds no new buffer-backing behavior. |
…hile recording A copy recorded then discarded by Close and Reset no longer stops the destination's first upload from title memory. Pending writes are tracked per recording, read by that list, committed by ExecuteCommandLists and dropped on Reset or a failed Close.
|
Thanks, reproduced and fixed in 18ec51d (code in 0aafe6b).
Verification (Windows Server 2025, WARP, default 3-slot pool, AI-assisted; commands listed were executed locally. |
R0Y00
left a comment
There was a problem hiding this comment.
The previous source and discarded-recording findings are resolved. On Windows Release I independently ran all six startup_list_copy checks on this head. Both WARP and RTX 4060 Laptop passed the discarded-copy and same-recording read controls. A Reset leaves the first upload available and a real submitted copy preserves GPU-written contents.
Related to #870 (no
Fixes).What changes
In render mode, three command-list slots that were dropped now copy whole resources:
CopyBufferRegion, slot 17CopyResource, slot 19ResolveSubresource(unshifted, like slots 12 to 25).COPY_SOURCE/COPY_DESTorRESOLVE_SOURCE/RESOLVE_DESTfor the call and back toCOMMONat Close. An upload buffer stays readable and a readback buffer stays a copy destination.size_mismatch,sample_mismatch,range_overflow,source_not_multisampled, ...). Calls on a closed list are ignored.R16G16B16A16, as in startup: show a typeless 16-bit RGBA surface through a half-float view #1729; normalised for the 8-bit and 10-bit families). One with no single choice (for exampleR16_TYPELESS) is refused asbad_format.x2w_d3d12_list_copy_statsexports the counters for fixtures.CopyTextureRegion(16) andCopyTiles(18) are left out on purpose.Code is in new files:
src/startup_stubs/list_copy.h(pure checks) andlist_copy.inl(handlers).d3d12_xs_device.cppgets one include of each, plus three install lines after the slot 52 line.These slots have not been seen in a title log yet; the placement follows the unshifted slot order.
Checks run locally (Linux)
Not run
startup_list_copy_{warp,hardware}and the new device code have not been built or run; they need Windows. The fixture records on one list: clear and copy, a swapped copy (the empty texture stays empty), a 4-sample resolve, a typeless half-float resolve, two buffer copies with offsets, four refused calls (size mismatch, null source, one-sample resolve source, range past the end) and calls on a closed list, then reads everything back and checks the debug layer.AI-assisted; commands listed were executed locally.
Replaces closed draft #1811 (rebased cleanly on origin/main).
AI-assisted; commands listed were executed locally.