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

> Represents a resource in which all UAV accesses must complete before any future UAV accesses can begin.

Represents a resource in which all UAV accesses must complete before any future UAV accesses can begin.

## Syntax

```cpp theme={null}
typedef struct D3D12_RESOURCE_UAV_BARRIER
{
    ID3D12Resource  pResource;
} D3D12_RESOURCE_UAV_BARRIER
```

### Members

*pResource*\
Type: ID3D12Resource \*

The resource used in the transition, as a pointer to [ID3D12Resource](/reference/graphics/d3d12_xs/interfaces/ID3D12Resource/id3d12resource_xs).

## Remarks

This struct represents a resource in which all unordered access view (UAV) accesses (reads or writes) must complete before any future UAV accesses (read or write) can begin.

This structure is a member of the [D3D12\_RESOURCE\_BARRIER](/reference/graphics/d3d12/structs/d3d12_resource_barrier_public) structure.

You don't need to insert a UAV barrier between 2 draw or dispatch calls that only read a UAV.
Additionally, you don't need to insert a UAV barrier between 2 draw or dispatch calls that write to the same UAV if you know that it's safe to execute the UAV accesses in any order.
The resource can be **NULL**, which indicates that any UAV access could require the barrier.

## 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](/reference/graphics/d3d12/structs/d3d12_resource_barrier_public.md)
- [D3D12_RESOURCE_BARRIER_TYPE](/reference/graphics/d3d12/enums/d3d12_resource_barrier_type_public.md)
- [D3D12_UAV_DIMENSION](/reference/graphics/d3d12/enums/d3d12_uav_dimension_public.md)
- [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)
