Repository navigation
Conversation
591da01 to
4a3c9f1
Compare
… skipped keeps its stand-in) into the integration Brings in Marvisak#159's base commit too (occlusion, statistics and timestamp queries on the host). Query resolves use the branch's HostList::readback(host, size), not a second readback helper. An indirect mesh dispatch that does not run marks the list's queries missed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66
4a3c9f1 to
29c52d2
Compare
|
Two corrections to my own PR. 1. A claim I have withdrawn. The first commit's message said the query tests were clean under the debug layer and GPU-based validation. That was wrong: the D3D12 debug layer ( 2. This needs adapting once a buffer-state tracker lands (#334 or #367).
The fix is to drop the manual barrier and ask the tracker for COPY_DEST before the resolve ( If someone with the debug layer installed can run |
29c52d2 to
f42e7d5
Compare
|
Thank you for this, @r4tedx! Many pull requests here are still waiting to be merged, so I've ported this one to 465d6a0eac/AgentRecompVI, a VIctory fork where AI agents review and merge each other's work: https://github.com/465d6a0eac/AgentRecompVI/pull/28. You're credited as the author there. This pull request stays the original. Test results
|
|
Automated triage for the maintainers. Thanks for the merge of Open items, as the description lists them: no debug-layer or DRED run yet, and GPU reads of a resolve buffer later in the same submission still see the old bytes. Verdict: merge candidate (a recommendation to look, not an approval). CI: passing. Generated by Claude Code |
|
@JurajSimicevic thank you, both for closing #1740 in this one's favour and for the offer there, which I only saw now. Yes please. This branch is being brought up to What a run in the game with the debug layer and DRED would settle, and what I cannot check here (this machine has no debug layer, and the title is not launched on it):
Nothing was run for this comment. AI-assisted (Claude Code). |
No query ran on the host GPU. BeginQuery and EndQuery did nothing and ResolveQueryData wrote stand-ins after the submission. A title heap for occlusion, pipeline statistics or timestamps gets a host heap on first use. Begin and end are recorded in order with draws. Timestamps only end, duplicate begins and ends without a begin in the same list are dropped, and close ends outstanding host queries. The host resolves measured queries into mapped read-back memory owned by the command list, in COPY_DEST throughout. It reuses arena chunks on reset. Ordered bottom-of-pipe CPU writes put measured results and stand-ins into title memory, including unaligned destinations. The last resolve of a slot wins across all lists in the submission. Timestamps are converted with the host queue's calibration onto the title's 100 MHz clock, sampled before applying any deferred writes. Main's shader copy-back is unchanged. A list that read title memory with no host copy withholds its shader writes, and still runs the deferred CPU writes. Subsequent GPU reads get the new title bytes through main's normal host-copy refresh, as they do for stand-ins. The CPU sees the query results after the resolving submission. GPU commands later in that submission see the destination's previous bytes. Main has no predication implementation. Tests use synthetic title list, queue and heap calls with a small host triangle. They cover measured queries, stand-ins, overlapping resolves, timestamp ordering, the missed-list case, and the same buffer used as a UAV before the resolve and refreshed on a later submission. The full diagnostics suite passed on WARP after the rebase (153 passed, 2 ignored). Both workspace Clippy configurations passed. The earlier RTX 5070 runs were before the rebase. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…d-in A title draw the host skips because its pipeline is unavailable, its shader is unsupported or its indirect execution cannot run leaves any surrounding occlusion query counting too few samples. The title can then cull what the draw would have shown. Mark active queries when a draw, mesh dispatch or indirect execution is skipped. End marked occlusion and binary occlusion queries on the host and write their stand-ins (2^20 samples or visible) through the same deferred CPU write path as measured results. Pipeline statistics keep what the host counted. A synthetic title draw without a bound pipeline exercises the two occlusion stand-ins. The query begun after the skipped draw measures zero and the statistics include the host draw. The test passed on WARP after the rebase. The earlier RTX 5070 run preceded the rebase. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
f42e7d5 to
b7249e5
Compare
|
@JurajSimicevic the head for your run is One thing changed beyond the rebase, and it bears on what your debug-layer run would have shown. The earlier head resolved occlusion and statistics results straight into the title buffer's host copy and assumed that copy was in COMMON. A review of the rebased code found that this does not hold in the world: What a run would settle now:
Tested at No game data was used. AI-assisted. |
|
Hardware result for b7249e5 on an NVIDIA GeForce RTX 3050 Laptop GPU (adapter identified from the D3D12 device LUID). I extended the synthetic triangle test to bracket its draws with two timestamps, resolve all three query types into separate ranges of the same buffer, and submit the list once.
This exercises CPU readback after completion. D3D12GetDebugInterface(ID3D12Debug) returned 0x887A002D here. Debug-layer/DRED diagnostics and GPU consumption of the result within the same submission remain open. AI-assisted, synthetic inputs only. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… works Main's 315cea1 made the clamp read the title's records through a root view and write the clamped ones into an argument buffer of the list's own: `indirect::bound` takes no title buffer and returns that buffer, and the title's copy is never transitioned or written. The test now passes the returned buffer to `indirect::done`, checks the title's records are as written, and is named for what it checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…his line has them placed_uav_textures_create_real_host_uavs (main's, Marvisak#1273): Marvisak#2294 (96f6894) makes a typed depth format in a shader resource view in its readable colour format (fits, DEPTH_READABLE), so an SRV of an R32_TYPELESS or R16_TYPELESS texture in D32_FLOAT or D16_UNORM is now a real R32_FLOAT or R16_UNORM view, not the null fallback. The debug layer logs nothing for it, as the test checks. SRV cases 0 and 1 now expect a real view. The unordered-access cases stay null. query_resolves_after_unordered_access_to_destination (Marvisak#159's): main's clamp (315cea1) reads the title's records through a root view and writes into the list's own argument buffer, so the destination's copy is never written or left in unordered access. The test checks the title's records stay as written and that the resolve lands, and is renamed query_resolves_after_a_clamp_reads_destination. This is the author-branch fix gpu/host-queries ba872ae2 with this line's bound() arguments. PLAY-MAIN-781E846.md: both traced and fixed in the tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged main AI-assisted |
Rebased onto
main940d32fand reworked (headb7249e5, 2026-11-25).mainstill has no host queries (BeginQuery/EndQuerydo nothing,ResolveQueryDatawrites stand-ins), so the change is still needed. What is different from the earlier head: results no longer go into the title buffer's host copy; they go through read-back memory, see "What".mainalready has the overflow-safe bounds check of #52, so this no longer touches it.What
The README lists real queries as missing for the world:
BeginQuery/EndQuerydid nothing andResolveQueryDatawrote stand-ins (2^20 samples, visible, zero statistics, the clock after the submission).First commit:
BeginQuery/EndQueryare recorded into the list's host list in order with its draws, by D3D12's rules: timestamps only end, a query already running does not begin again, an end without its begin in the same list is dropped, queries still running at close are ended there (and keep the stand-in).ResolveQueryDataresolves every measured query, of any type, into read-back memory the list owns: mapped 64 KiB chunks that stay copy destinations and are reused after a reset. No title buffer's host copy is touched, so the resolve does not depend on the state the title's shaders and indirect executions left that copy in. An earlier head resolved into the host copy and assumed it was in COMMON, which a review found does not hold in the world (indirect::doneleaves the copy in UNORDERED_ACCESS, and a submission's lists share oneExecuteCommandLists).main's copy-back of shader writes is unchanged, and a list whose shaders read title memory with no host copy still delivers its query results, since deferred writes are not withheld.GetTimestampFrequencyand bottom-of-pipe timestamps use) from the host queue's clock calibration, read once before the writes, so a stand-in timestamp written first never reads earlier than a host one after it.Second commit: an occlusion or binary occlusion query with a title draw inside that the host did not run (pipeline not ready, a shader that does not translate, an indirect execution that cannot run) is ended on the host but keeps the stand-in "visible". Otherwise, while draws of untranslated shaders are still dropped, real queries would report nothing visible and the title would cull by that.
Known limits
mainhas no predication, the one D3D12 feature that reads a resolve buffer on the GPU.y * z != 1runs only itsxgroups.main's heap-view, title-memory and depth-twin dispatches) are counted in pipeline statistics.Not verified
Nothing has run on a hardware GPU, under the D3D12 debug layer or in the title since the rebase; the RTX 5070 runs were of the earlier head. No game files were used.
Tested
At
b7249e5, on WARP only (VICTORY_D3D12_WARP=1,--features diagnostics, one test thread), synthetic. The tests call the title's list, queue and heap methods; the draws come from a small host pipeline recorded into the title list's host list, since title pipelines need translated console shaders.DrawInstancedwith nothing bound inside occlusion queries resolves to the stand-ins while a query begun after it measures 0.cargo test -p victory-gpu: 153 passed, 0 failed, 2 ignored (the two aremain's benchmarks).cargo test -p xtask: 6 passed.cargo clippy --workspace --all-targets --locked -- -D warningsand the--all-featuresvariant: clean.#32 rewrites parts of
host.rsthis touches; whichever lands second needs a rebase.AI-assisted; no game assets were used.
🤖 Generated with Claude Code