> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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](https://docs.xbox.com/reference/graphics/d3d12_xs/interfaces/ID3D12Resource/id3d12resource_xs.md) 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](https://docs.xbox.com/reference/graphics/d3d12_x/enums/d3d12_resource_states.md) enumeration constants.

*StateAfter*\
Type: D3D12\_RESOURCE\_STATES

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

## Remarks

This struct is used by the **Transition** member of the
[D3D12\_RESOURCE\_BARRIER](https://docs.xbox.com/reference/graphics/d3d12/structs/d3d12_resource_barrier_public.md) 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)


## Related topics

- [D3D12_RESOURCE_BARRIER](https://docs.xbox.com/reference/graphics/d3d12/structs/d3d12_resource_barrier_public.md)
- [D3D12_RESOURCE_BARRIER_TYPE](https://docs.xbox.com/reference/graphics/d3d12/enums/d3d12_resource_barrier_type_public.md)
- [D3D12_RESOURCE_ALIASING_BARRIER](https://docs.xbox.com/reference/graphics/d3d12/structs/d3d12_resource_aliasing_barrier_public.md)
- [D3D12_RESOURCE_UAV_BARRIER](https://docs.xbox.com/reference/graphics/d3d12/structs/d3d12_resource_uav_barrier_public.md)
- [D3D12_TEXTURE_BARRIER (XBOX Series consoles)](https://docs.xbox.com/reference/graphics/d3d12/structs/d3d12_texture_barrier_public.md)
