D3D12CpuTimelineQueryResolution: document debug-layer validation and clarify GPU vs CPU resolve ordering#249
Open
JoeCitizen wants to merge 1 commit into
Conversation
…clarify GPU vs CPU resolve ordering Document the debug-layer validation on ID3D12Device::ResolveQueryData, for parity with the GPU-timeline resolve: heap-flag mismatch (RESOLVEQUERYDATA_INVALID_QUERYHEAP), out-of-range or incompatible query type (RESOLVE_QUERY_DATA_INVALID_PARAMETERS), and never-performed queries (RESOLVE_QUERY_INVALID_QUERY_STATE). Changelog 1.3 and 1.5. Also correct a misleading remark (per themaister feedback): the GPU-timeline ResolveQueryData is implicitly ordered after EndQuery within a command queue and needs no synchronization or resource barrier, whereas the CPU-timeline resolve is not implicitly ordered and requires explicit application synchronization before the call. Changelog 1.4. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
amarpMSFT
approved these changes
Jun 24, 2026
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.
Updates the D3D12 CPU Timeline Query Resolution spec for
ID3D12Device::ResolveQueryData.Changes
ID3D12GraphicsCommandList::ResolveQueryData:D3D12_MESSAGE_ID_RESOLVEQUERYDATA_INVALID_QUERYHEAP— the query heap was not created with theD3D12_QUERY_HEAP_FLAG_CPU_RESOLVEflag.D3D12_MESSAGE_ID_RESOLVE_QUERY_DATA_INVALID_PARAMETERS— the range[StartIndex, StartIndex + NumQueries)falls outside the query heap, orTypeis incompatible with the query heap's type.D3D12_MESSAGE_ID_RESOLVE_QUERY_INVALID_QUERY_STATE— a query in the resolved range was never performed.EndQuerywithin a command queue (no synchronization or resource barrier required), whereas the CPU-timeline resolve is not implicitly ordered and requires explicit application synchronization before the call. Based on feedback from Hans-Kristian Arntzen (themaister).The companion runtime and debug-layer changes are made in the D3D12 runtime.