> ## 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_TRANSITION_BARRIER

> Describes the transition of subresources between different usages.

Describes the transition of subresources between different usages.

## Syntax

```cpp theme={null}
typedef struct D3D12_RESOURCE_TRANSITION_BARRIER
{
    ID3D12Resource  pResource;
    UINT Subresource;
    D3D12_RESOURCE_STATES StateBefore;
    D3D12_RESOURCE_STATES StateAfter;
} D3D12_RESOURCE_TRANSITION_BARRIER
```

### Members

*pResource*\
Type: ID3D12Resource \*

A pointer to the [ID3D12Resource](/reference/graphics/d3d12_xs/interfaces/ID3D12Resource/id3d12resource_xs) object that represents the resource used in the transition.

*Subresource*\
Type: UINT

The index of the subresource for the transition.
Use the **D3D12\_RESOURCE\_BARRIER\_ALL\_SUBRESOURCES** flag ( 0xffffffff ) to transition all subresources in a resource at the same time.

*StateBefore*\
Type: D3D12\_RESOURCE\_STATES

The "before" usages of the subresources, as a bitwise-OR'd combination of [D3D12\_RESOURCE\_STATES](/reference/graphics/d3d12_x/enums/d3d12_resource_states) enumeration constants.

*StateAfter*\
Type: D3D12\_RESOURCE\_STATES

The "after" usages of the subresources, as a bitwise-OR'd combination of [D3D12\_RESOURCE\_STATES](/reference/graphics/d3d12_x/enums/d3d12_resource_states) enumeration constants.

## Remarks

This struct is used by the **Transition** member of the
[D3D12\_RESOURCE\_BARRIER](/reference/graphics/d3d12/structs/d3d12_resource_barrier_public) struct.

## 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)
