Skip to content

LiteFX::Rendering::IDeviceMemory::moved

An event that gets invoked, after the resource has been moved to a different location, but before the old resource gets destroyed.

Synopsis

Declared in <litefx/rendering_api.hpp>

mutable
Event<EventArgs> moved;

Description

This event gets invoked during defragmentation to inform any subscribers about a relocation. You might want to subscribe to this event is to update any descriptor bindings, as they become invalid after the previous resource gets removed. Additionally, you may want to insert barriers to transition the resource back into the desired layout.

Note that this event is invoked on the thread that executes the defragmentation process, which means you potentially might want to synchronize the handler with other resource accesses.

See Also

moving

IGraphicsFactory::defragment