Skip to content

D3D12CpuTimelineQueryResolution: document debug-layer validation and clarify GPU vs CPU resolve ordering#249

Open
JoeCitizen wants to merge 1 commit into
microsoft:masterfrom
JoeCitizen:validate-cpu-resolve-never-performed
Open

D3D12CpuTimelineQueryResolution: document debug-layer validation and clarify GPU vs CPU resolve ordering#249
JoeCitizen wants to merge 1 commit into
microsoft:masterfrom
JoeCitizen:validate-cpu-resolve-never-performed

Conversation

@JoeCitizen

Copy link
Copy Markdown
Contributor

Updates the D3D12 CPU Timeline Query Resolution spec for ID3D12Device::ResolveQueryData.

Changes

  • Document the debug-layer validation for the CPU-timeline resolve, bringing it to parity with the GPU-timeline ID3D12GraphicsCommandList::ResolveQueryData:
    • D3D12_MESSAGE_ID_RESOLVEQUERYDATA_INVALID_QUERYHEAP — the query heap was not created with the D3D12_QUERY_HEAP_FLAG_CPU_RESOLVE flag.
    • D3D12_MESSAGE_ID_RESOLVE_QUERY_DATA_INVALID_PARAMETERS — the range [StartIndex, StartIndex + NumQueries) falls outside the query heap, or Type is incompatible with the query heap's type.
    • D3D12_MESSAGE_ID_RESOLVE_QUERY_INVALID_QUERY_STATE — a query in the resolved range was never performed.
  • Clarify the GPU vs CPU ordering remark. The previous text implied the CPU-timeline resolve "mirrors" the GPU-timeline resolve's synchronization requirement. In fact the GPU-timeline resolve is implicitly ordered after EndQuery within 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).
  • Changelog entries 1.3, 1.4 and 1.5.

The companion runtime and debug-layer changes are made in the D3D12 runtime.

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants