Repository navigation
D3D12.X: queue #18 before the layout is known writes 8 bytes - #121
Merged
Merged
Conversation
Until a title's queue calls show which console layout its runtime has, queue xcl-dev#18 went to the older layout's GetDesc, which writes a 16-byte D3D12_COMMAND_QUEUE_DESC. On the newer layout xcl-dev#18 is GetTimestampFrequency(UINT64*), so a call before the first Signal wrote 8 bytes past the title's out-param. A Signal / Wait with a fence at xcl-dev#14 / xcl-dev#15 now marks the older layout. Until one of the layouts is known, xcl-dev#18 writes only the first 8 bytes of the description (type and priority) and logs a warning once. After that it is the full GetDesc (older) or GetTimestampFrequency (newer), as before. Test queue_slot_18_before_the_layout_is_known_writes_8_bytes (fake adopted queue).
Collaborator
|
Merged. Checked on Windows 11 with an RX 9070 (RDNA4), merged together with the rest of #110–#129: |
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.
#104 item 4.
Until the title's calls show which queue layout it has,
queue_dispatchsent #18 to the older layout's GetDesc, which writes a 16-byteD3D12_COMMAND_QUEUE_DESC. On the newer layout #18 isGetTimestampFrequency(UINT64*), so a call before the first Signal wrote 8 bytes past the out-param.Changes:
QUEUE_OLDER). This is the same test the dispatch already uses to route those slots.Cost: an older-layout title that calls GetDesc before it signals anything gets Flags / NodeMask unwritten. Before this change, a newer-layout title in the same position had its stack overwritten.
Test
queue_slot_18_before_the_layout_is_known_writes_8_bytesuses a fake adopted queue (its own PC table). It checks the 8-byte write before the layout is known, then the full description after a fenced Signal at #14. Without the change it fails (all 16 bytes written). The other lib tests that run on a GTX 1650 under Wine pass too. Not run with a retail title.