D3D12DDI_TEXTURE_BARRIER_0088 structure (d3d12umddi.h)

A D3D12DDI_TEXTURE_BARRIER_0088 structure describes access transitions for textures.

Syntax

typedef struct D3D12DDI_TEXTURE_BARRIER_0088 {
  D3D12DDI_BARRIER_SYNC                   SyncBefore;
  D3D12DDI_BARRIER_SYNC                   SyncAfter;
  D3D12DDI_BARRIER_ACCESS                 AccessBefore;
  D3D12DDI_BARRIER_ACCESS                 AccessAfter;
  D3D12DDI_BARRIER_LAYOUT                 LayoutBefore;
  D3D12DDI_BARRIER_LAYOUT                 LayoutAfter;
  D3D12DDI_HRESOURCE                      hResource;
  D3D12DDI_BARRIER_SUBRESOURCE_RANGE_0088 Subresources;
  D3D12DDI_TEXTURE_BARRIER_FLAGS_0088     Flags;
} D3D12DDI_TEXTURE_BARRIER_0088;

Members

SyncBefore

A D3D12DDI_BARRIER_SYNC value that specifies the synchronization scope of all preceding GPU work that must be completed before executing the barrier.

SyncAfter

A D3D12DDI_BARRIER_SYNC value that specifies the synchronization scope of all subsequent GPU work that must wait until the barrier execution is finished.

AccessBefore

A D3D12DDI_BARRIER_ACCESS value that specifies the access state of the texture preceding the barrier execution.

AccessAfter

A D3D12DDI_BARRIER_ACCESS value that specifies the access state of the texture upon completion of barrier execution.

LayoutBefore

A D3D12DDI_BARRIER_LAYOUT value that specifies the layout of the texture preceding the barrier execution.

LayoutAfter

A D3D12DDI_BARRIER_LAYOUT value that specifies the layout of the texture upon completion of barrier execution.

hResource

The handle of the texture resource using the barrier.

Subresources

A D3D12DDI_BARRIER_SUBRESOURCE_RANGE_0088 structure that specifies the range of texture subresources being barriered.

Flags

A D3D12DDI_TEXTURE_BARRIER_FLAGS_0088 value that specifies optional flags.

Remarks

See Enhanced Barriers for general information.

Synchronization

Graphics processors are designed to execute as much work in parallel as possible. Any GPU work that depends on previous GPU work must be synchronized before accessing dependent data. The SyncBefore and SyncAfter values are logical bitfield masks that identify any work to synchronize.

A Barrier must wait for all preceding command SyncBefore scopes to complete before executing the barrier. Similarly, a Barrier must block all subsequent SyncAfter scopes until the barrier completes.

Layout transitions

Texture subresources can use different layouts for various access methods. For example, textures are often compressed when used as a render target or depth stencil and are often uncompressed for shader read or copy commands. Texture Barriers use LayoutBefore and LayoutAfter to describe layout transitions.

Layout transitions are only needed for textures, therefore they are expressed only in this data structure.

Both LayoutBefore and LayoutAfter must be compatible with the type of queue performing the barrier. For example, a compute queue cannot transition a subresource into or out of D3D12_BARRIER_LAYOUT_RENDER_TARGET.

To provide well-defined barrier ordering, the layout of a subresource after completing a sequence of barriers is the final LayoutAfter in the sequence.

Requirements

Requirement Value
Minimum supported client Windows 11 (WDDM 3.0)
Header d3d12umddi.h

See also

D3D12DDI_BARRIER_ACCESS

D3D12DDI_BARRIER_LAYOUT

D3D12DDI_BARRIER_SUBRESOURCE_RANGE_0088

D3D12DDI_BARRIER_SYNC

D3D12DDI_TEXTURE_BARRIER_FLAGS_0088

D3D12DDIARG_BARRIER_0088

PFND3D12DDI_BARRIER_0088