D3D12_RESOURCE_BARRIER structure

Describes a resource barrier (transition in resource use).

Syntax

typedef struct D3D12_RESOURCE_BARRIER {
  D3D12_RESOURCE_BARRIER_TYPE  Type;
  D3D12_RESOURCE_BARRIER_FLAGS Flags;
  union {
    D3D12_RESOURCE_TRANSITION_BARRIER Transition;
    D3D12_RESOURCE_ALIASING_BARRIER   Aliasing;
    D3D12_RESOURCE_UAV_BARRIER        UAV;
  };
} D3D12_RESOURCE_BARRIER;

Members

Type

A D3D12_RESOURCE_BARRIER_TYPE-typed value that specifies the type of resource barrier. This member determines which type to use in the union below.

Flags

Specifies a D3D12_RESOURCE_BARRIER_FLAGS enumeration constant such as for "begin only" or "end only".

Transition

A D3D12_RESOURCE_TRANSITION_BARRIER structure that describes the transition of subresources between different usages.
Members specify the before and after usages of the subresources.

Aliasing

A D3D12_RESOURCE_ALIASING_BARRIERstructure that describes the transition between usages of two different resources that have mappings into the same heap.

UAV

A D3D12_RESOURCE_UAV_BARRIERstructure that describes a resource in which all UAV accesses (reads or writes) must complete before any future UAV accesses (read or write) can begin.

Remarks

This structure is used by the ID3D12GraphicsCommandList::ResourceBarrier method.

Requirements

   
Header d3d12.h

See also

Core Structures

Using Resource Barriers to Synchronize Resource States in Direct3D 12