Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::StateTransitionDesc Struct Reference

Resource state transition barrier description. More...

#include <DeviceContext.h>

Public Member Functions

constexpr StateTransitionDesc (IDeviceObject *_pResourceBefore, IDeviceObject *_pResourceAfter) noexcept
 Aliasing barrier.
 

Public Attributes

IDeviceObjectpResourceBefore = nullptr
 Previous resource for aliasing transition.
 
IDeviceObjectpResource = nullptr
 Resource to transition.
 
Uint32 FirstMipLevel = 0
 When transitioning a texture, first mip level of the subresource range to transition.
 
Uint32 MipLevelsCount = REMAINING_MIP_LEVELS
 When transitioning a texture, number of mip levels of the subresource range to transition.
 
Uint32 FirstArraySlice = 0
 When transitioning a texture, first array slice of the subresource range to transition.
 
Uint32 ArraySliceCount = REMAINING_ARRAY_SLICES
 When transitioning a texture, number of array slices of the subresource range to transition.
 
RESOURCE_STATE OldState = RESOURCE_STATE_UNKNOWN
 Resource state before transition.
 
RESOURCE_STATE NewState = RESOURCE_STATE_UNKNOWN
 Resource state after transition.
 
STATE_TRANSITION_TYPE TransitionType = STATE_TRANSITION_TYPE_IMMEDIATE
 State transition type, see Diligent::STATE_TRANSITION_TYPE.
 
STATE_TRANSITION_FLAGS Flags = STATE_TRANSITION_FLAG_NONE
 State transition flags, see Diligent::STATE_TRANSITION_FLAGS.
 

Detailed Description

Resource state transition barrier description.

Member Data Documentation

◆ NewState

RESOURCE_STATE Diligent::StateTransitionDesc::NewState = RESOURCE_STATE_UNKNOWN

Resource state after transition.

Must not be Diligent::RESOURCE_STATE_UNKNOWN or Diligent::RESOURCE_STATE_UNDEFINED.

Note
Resource state must be compatible with the context type.

◆ OldState

RESOURCE_STATE Diligent::StateTransitionDesc::OldState = RESOURCE_STATE_UNKNOWN

Resource state before transition.

If this value is Diligent::RESOURCE_STATE_UNKNOWN, internal resource state will be used, which must be defined in this case.

Note
Resource state must be compatible with the context type.

◆ pResource

IDeviceObject* Diligent::StateTransitionDesc::pResource = nullptr

Resource to transition.

Can be ITexture, IBuffer, IBottomLevelAS, ITopLevelAS.

Note
For aliasing transition (Diligent::STATE_TRANSITION_FLAG_ALIASING flag is set), pResource may be null, which indicates that any sparse or normal resource could cause aliasing.

◆ pResourceBefore

IDeviceObject* Diligent::StateTransitionDesc::pResourceBefore = nullptr

Previous resource for aliasing transition.

This member is only used for aliasing transition (Diligent::STATE_TRANSITION_FLAG_ALIASING flag is set), and ignored otherwise, and must point to a texture or a buffer object.

Note
pResourceBefore may be null, which indicates that any sparse or normal resource could cause aliasing.

◆ TransitionType

STATE_TRANSITION_TYPE Diligent::StateTransitionDesc::TransitionType = STATE_TRANSITION_TYPE_IMMEDIATE

State transition type, see Diligent::STATE_TRANSITION_TYPE.

Note
When issuing UAV barrier (i.e. OldState and NewState equal Diligent::RESOURCE_STATE_UNORDERED_ACCESS), TransitionType must be Diligent::STATE_TRANSITION_TYPE_IMMEDIATE.