Repository navigation
d3d12_xs: no GPU timestamp on a COPY list; depth bounds survive a list cut (RT-XS-LIST-VALUES-COPY-TIMESTAMP-AND-DEPTH-BOUNDS) - #2500
Open
Tyrannys wants to merge 1 commit into
Conversation
…t cut Two gaps in console list values: - take_timestamp recorded EndQuery and ResolveQueryData on the device's TIMESTAMP query heap for any list that tracks values, COPY lists included. A COPY list needs a COPY_QUEUE_TIMESTAMP heap, so the queue refused the whole submission (and D3D12 validation flags it). A timestamp write on a COPY list now takes the CPU's clock when it lands, the existing fallback. - OMSetDepthBoundsX (console slot 70 -> PC slot 62) was forwarded but not kept in ListState. A draw after a list cut, and in a list after ExecuteBundle, ran with the default [0, 1] bounds. ListState now records the bounds once the real list took them, inherits them from a bundle and replays them after a cut. From kevincommits' finding in ProjectLeonida#1608 (item 3). xs_proxy_mock_test gains check_list_values_copy_and_depth_bounds. The mock list now answers GetType with its creation type and captures slot 62's float arguments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: RT-XS-LIST-VALUES-COPY-TIMESTAMP-AND-DEPTH-BOUNDS (#1608 (comment))
What and why
Item 3 of @kevincommits' finding in #1608 (#1608 (comment)). Thanks for the audit.
COPY-list timestamps.
take_timestamp(d3d12_xs_device.cpp) recordedEndQueryandResolveQueryDataon the device'sD3D12_QUERY_HEAP_TYPE_TIMESTAMPheap for every list that tracks values, and COPY lists track them too. A COPY list needs aCOPY_QUEUE_TIMESTAMPheap: the layer'sCommandQueue::timestamps_fit()refuses the whole COPY submission (invalid_query), and Windows' D3D12 validation flags it. A timestamp write (write64 flag 1 or 2) on a COPY list now takes the CPU's clock when it lands, the fallback the code already has for a device without the heap. DIRECT and COMPUTE lists keep the GPU's timestamp.A separate
COPY_QUEUE_TIMESTAMPheap per device would keep GPU timing on copy lists. That is left for later: it needs a second heap and readback, and the copy queue's clock calibration.Depth bounds across a list cut.
OMSetDepthBoundsX(console slot 70, PC slot 62) was forwarded to the real list but not kept inlist_values::ListState. Any draw after a list cut (a wait after work), and any list afterExecuteBundleof a bundle that set them, went back to D3D12's default[0, 1].ListStatenow records the bounds once the real list has taken them, clears them on Reset like the rest, inherits a bundle's, and replays them after a cut (through slot 62 of the new real list, which is the same kind of list).Overlap: #2484 (
RT-XS-LATE-RELAY, list values) touches the same three files on other lines;git merge-treefinds no conflict. The new test sits besidecheck_list_values, not in it, and runs between it andcheck_list_values_more, while the list-values threads are up. No conflict with #2498 either (the descriptor-mirror item, same files).Tested
Windows 11, MSVC (VS 18), RelWithDebInfo, on
main43a9d56. CPU only.The mock list now answers
GetType(slot 8) with the type it was created with, and records slot 62's float arguments.xs_proxy_mock_testgainscheck_list_values_copy_and_depth_bounds:EndQueryorResolveQueryData, while a DIRECT list still records both, with the TIMESTAMP query type.OMSetDepthBounds(0.25, 0.75)again;(0.125, 0.5)executed in the list is replayed after its cut.With
main's shims the test fails at the COPY check. With only theListStaterecording line removed, it fails at the first replay check. With the fix it passes.ctest -R "^(xs_proxy_mock.*|device_proxy)$": 10/10 pass.scripts/check_no_game_data.py: clean.GPUs tested: profile M: NVIDIA GeForce RTX 4070 SUPER, 12 GB, desktop, driver 621.01, Windows 11 (CPU tests only)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code