Skip to content

D3D12 Unified spec - #272

Draft
Jesse Natalie (jenatali) wants to merge 24 commits into
microsoft:masterfrom
jenatali:d3d12-unified
Draft

Jesse Natalie (jenatali) wants to merge 24 commits into
microsoft:masterfrom
jenatali:d3d12-unified

Conversation

@jenatali

Copy link
Copy Markdown
Member

This represents an attempt at changing the way that the D3D12 spec process works. Rather than writing a dozen feature specs that are all deltas against the implicit baseline of the D3D11.3 spec, we have one spec that documents the current state of the world. Feature proposals are then written as deltas against the spec, discussed, approved, implemented, and once they ship, the relevant portions of the feature proposals can be merged into the spec.

This spec is AI-assembled from the D3D11.3 spec, the dozens of feature specs present on DirectX-Specs, fact-checked against runtime and WARP implementation to check for drift, filling in missing details with archived specs that were never published, and MSLearn content. Additional gap coverage is AI-authored and not yet reviewed and human-edited.

I expect significant additional iteration before this spec is ready to serve its intended purpose.

Comment thread d3d/unified/resource-operations.md Outdated
> Editorial adoption does not establish factual or hardware verification. Exact approved factual
> corrections do not trigger a marker. Unmarked text elsewhere, declarations
> and structural Markdown are not assertions of approval.
> [Annotation scope and approvals](../../spec-maintenance/d3d12/prose-annotations.md).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this file is not included in this PR.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, intentionally so, I'll clean this up.

Comment thread d3d/unified/resource-operations.md Outdated
> [!WARNING]
> **Authored synthesis - human review pending.**
>
> This is a source-preserving draft. The selected copy, clear, resolve and discard contracts include the applicable maintainer resolutions; source-only requirements are not claims of universal implementation verification.

@alexgong14 alexgong14 Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may want to clean this up as well as a few paragraphs below, we probably don't want to add these links to other sections? The Chapters in README.md already has this info.

Comment thread d3d/unified/resource-operations.md Outdated
> [!WARNING]
> **Authored synthesis - human review pending.**
>
> A texture copy location selects either a texture subresource or a placed footprint in a buffer. Texture subresources identify a mip, array slice and plane using the [canonical indexing rule](resources.md#subresources); a 3D texture's depth slices are not array subresources. Coordinates are relative to the selected mip/plane, not implicitly to mip zero.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good idea to link the "canonical indexing rule" to "Subresource indexing" section.
And we can remove "not implicitly to mip zero" if that's just repeating the earlier sentence.

Comment thread d3d/unified/resource-operations.md Outdated
> the copy/clear/resolve and graphics DiscardResource methods. The separate
> [immediate-write entries](#immediate-buffer-writes) and video discard
> entries define their own declaring-list and recording contexts; they do not
> inherit a blanket ban from this table.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably just say:
This table applies only to the eleven graphics copy, clear, resolve, and discard methods listed above. WriteBufferImmediate and video-command-list DiscardResource methods follow the separate rules in their own sections.

Maybe we can get rid of the first sentence too.

> | `CopyBufferRegion`, `CopyTextureRegion`, `CopyResource`, `CopyTiles` | Yes | Yes | Yes | No |
> | `ClearRenderTargetView`, `ClearDepthStencilView`, `ResolveSubresource`, `ResolveSubresourceRegion` | Yes | No | No | No |
> | `ClearUnorderedAccessViewUint`, `ClearUnorderedAccessViewFloat`, `DiscardResource` | Yes | Yes | No | No |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Async Commands is shipped in retail now, it's probably a good idea to talk about them here

Comment thread d3d/unified/resource-operations.md Outdated
> [!WARNING]
> **Authored synthesis - human review pending.**
>
> The application must supply the access/layout appropriate to the operation under [enhanced barriers](synchronization.md#barrier-access). The corresponding legacy path remains supported under [resource states](synchronization.md#legacy-resource-states), including its [promotion/decay rules](synchronization.md#legacy-promotion-and-decay).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can link “access” and “layout” to their respective sections, while linking “enhanced barriers” to the broader Enhanced barriers section.

> [!WARNING]
> **Authored synthesis - human review pending.**
>
> | Operation/use | Enhanced access | Texture layout where applicable | Legacy state |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need better names here, suggestions:
Enhanced Barriers access
Enhanced Barriers layout
Legacy resource state

Comment thread d3d/unified/resource-operations.md Outdated
>
> | Operation/use | Enhanced access | Texture layout where applicable | Legacy state |
> |---|---|---|---|
> | Copy source / destination, including the direction selected by `CopyTiles` | `COPY_SOURCE` / `COPY_DEST` | Copy-compatible source/destination layout; common-layout cases retain their canonical permissions | `COPY_SOURCE` / `COPY_DEST` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the enhanced barriers layout column, I think this should say “COPY_SOURCE / COPY_DEST, including queue-specific variants,” and maybe we can separately mention the COMMON and GENERIC_READ cases for both enhanced barriers and legacy barriers.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure this is the best replacement, but we probably shouldn’t call out COMMON only for Enhanced Barriers when legacy COMMON also permits copy usage through its promotion/decay rules.

Comment thread d3d/unified/resource-operations.md Outdated
> [!WARNING]
> **Authored synthesis - human review pending.**
>
> The access names in this table have the `D3D12_BARRIER_ACCESS_` prefix, layouts have `D3D12_BARRIER_LAYOUT_`, and legacy states have `D3D12_RESOURCE_STATE_`. Buffers have no transitionable texture layout. [Queue/layout/access compatibility](synchronization.md#queue-compatibility) and [legacy COPY-queue interchange](synchronization.md#legacy-common-state-promotion) remain requirements; the table is not permission to use an unsupported queue or format.

@alexgong14 alexgong14 Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the table is not permission to use an unsupported queue or format.

I don't think this sentence is necessary.

Comment thread d3d/unified/resource-operations.md Outdated
> [!WARNING]
> **Authored synthesis - human review pending.**
>
> Discard uses its [command-list/resource-flag-specific access rules](#discardresource), rather than an invented generic discard state. In-place `DECOMPRESS` retains the source-access exception defined in [regional resolve](#resolvesubresourceregion).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: We probably want to define and link to the specific section under DiscardResource, but it’s not hard to find since it’s near the top.

For DECOMPRESS, it takes some reading to find this information. We can probably just state it here: “If decompression uses the same subresource and matching region as both source and destination, source access alone is sufficient.” Or we can link to that specific section.

Comment thread d3d/unified/resource-operations.md Outdated
> [!WARNING]
> **Authored synthesis - human review pending.**
>
> The operation scopes are [`D3D12_BARRIER_SYNC_COPY`, `D3D12_BARRIER_SYNC_RESOLVE`, `D3D12_BARRIER_SYNC_RENDER_TARGET`, `D3D12_BARRIER_SYNC_DEPTH_STENCIL`, and `D3D12_BARRIER_SYNC_CLEAR_UNORDERED_ACCESS_VIEW`](synchronization.md#barrier-sync). The UAV-clear scope is not the compute-shading scope. [Barrier-free access](synchronization.md#barrier-free-access) and [model interoperation](synchronization.md#model-interoperation) determine which dependencies require barriers; ordinary UAV clears do not obtain an implicit dispatch-ordering guarantee.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good idea to put the two UAV-clear statements together.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is "operation scopes" the correct terminology here? I would probably call these Enhanced Barriers synchronization scopes.

Comment thread d3d/unified/resource-operations.md Outdated
> [!WARNING]
> **Authored synthesis - human review pending.**
>
> For protected resource operations, the [output-protection contract](../ProtectedResources.md#overview) requires the output to be protected whenever an operation reads protected input. This includes ordinary copies and resolves; copying protected contents to an unprotected destination is not permitted. The [command-list protected-session state](command-list-state.md#protection) and [resource/heap protection association](resources.md#protected-creation) apply to accesses and writes through the selected APIs. The [protected-operation predication restriction](counters-queries-and-predication.md#predication-operation-matrix) remains part of Queries' policy rather than an inferred uniform predicate rule.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should link “protected resource operations” instead of “output-protection contract,” since the target is the general Protected Resources overview.

I also find the last sentence difficult to understand.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m also not sure this is the right place to mention predication behavior for protected resources.

This branch has not been deployed

No deployments
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