Skip to content

LiteFX::Rendering::IDeviceMemory::prepareMove

An event that gets invoked to prepare a resource for a move operation.

Synopsis

Declared in <litefx/rendering_api.hpp>

mutable
Event<PrepareMoveEventArgs const&> prepareMove;

Description

The purpose of this event is to prepare a barrier that synchronizes the resource with other accesses. The event arguments of this event contain a reference to a barrier instance, that can be used to insert a barrier for the resource. Note that the transition must be supported on the underlying command queue that executes the move.

Note that both, the DirectX 12 as well as the Vulkan backend expect images to be in ImageLayout::Common layout before moving them.

See Also

IGraphicsFactory::defragment

https://microsoft.github.io/DirectX-Specs/d3d/D3D12EnhancedBarriers.html#command-queue-layout-compatibility