> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# D3D12_RESOURCE_BARRIER

> Describes a resource barrier (transition in resource use).

Describes a resource barrier (transition in resource use).

## Syntax

```cpp theme={null}
typedef struct D3D12_RESOURCE_BARRIER
{
    D3D12_RESOURCE_BARRIER_TYPE Type;
    D3D12_RESOURCE_BARRIER_FLAGS Flags;
    D3D12_RESOURCE_TRANSITION_BARRIER Transition;
    D3D12_RESOURCE_ALIASING_BARRIER Aliasing;
    D3D12_RESOURCE_UAV_BARRIER UAV;
} D3D12_RESOURCE_BARRIER
```

### Members

*Type*\
Type: D3D12\_RESOURCE\_BARRIER\_TYPE

A [D3D12\_RESOURCE\_BARRIER\_TYPE](/reference/graphics/d3d12/enums/d3d12_resource_barrier_type_public)-typed value that specifies the type of resource barrier.
This member determines which type to use in the union below.

*Flags*\
Type: D3D12\_RESOURCE\_BARRIER\_FLAGS

Specifies a [D3D12\_RESOURCE\_BARRIER\_FLAGS](/reference/graphics/d3d12_x/enums/d3d12_resource_barrier_flags) enumeration constant such as for "begin only" or "end only".

*Transition*\
Type: D3D12\_RESOURCE\_TRANSITION\_BARRIER

A [D3D12\_RESOURCE\_TRANSITION\_BARRIER](/reference/graphics/d3d12/structs/d3d12_resource_transition_barrier_public) structure that describes the transition of subresources between different usages.
Members specify the before and after usages of the subresources.

*Aliasing*\
Type: D3D12\_RESOURCE\_ALIASING\_BARRIER

A
[D3D12\_RESOURCE\_ALIASING\_BARRIER](/reference/graphics/d3d12/structs/d3d12_resource_aliasing_barrier_public) structure that describes the transition between usages of two different resources that have mappings into the same heap.

*UAV*\
Type: D3D12\_RESOURCE\_UAV\_BARRIER

A
[D3D12\_RESOURCE\_UAV\_BARRIER](/reference/graphics/d3d12/structs/d3d12_resource_uav_barrier_public) structure 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](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_resourcebarrier_public) method.

## Requirements

**Header:** d3d12\_xs.h or d3d12\_x.h\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[Core Structures](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-structures)

[Using Resource Barriers to Synchronize Resource States in Direct3D 12](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/using-resource-barriers-to-synchronize-resource-states-in-direct3d-12)


## Related topics

- [D3D12_RESOURCE_TRANSITION_BARRIER](/reference/graphics/d3d12/structs/d3d12_resource_transition_barrier_public.md)
- [D3D12_RESOURCE_ALIASING_BARRIER](/reference/graphics/d3d12/structs/d3d12_resource_aliasing_barrier_public.md)
- [D3D12_RESOURCE_UAV_BARRIER](/reference/graphics/d3d12/structs/d3d12_resource_uav_barrier_public.md)
- [D3D12_RESOURCE_BARRIER_TYPE](/reference/graphics/d3d12/enums/d3d12_resource_barrier_type_public.md)
- [D3D12_TEXTURE_BARRIER (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_texture_barrier_public.md)
