Skip to content

LiteFX::Rendering::IGraphicsFactory::allocate

allocate overloads

Synopses

Declared in <litefx/rendering_api.hpp>

Allocates a single resource as described by allocationInfo.

[[dllimport, dllexport]] virtual ResourceAllocationResult allocate(
    ResourceAllocationInfo const& allocationInfo,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;

» more...

Allocates a set of resources as described by allocationInfos.

[[dllimport, dllexport]] virtual Generator<ResourceAllocationResult> allocate(
    Enumerable<ResourceAllocationInfo const&> allocationInfos,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default,
    bool alias = false) const = 0;

» more...

Exceptions

NameThrown on
InvalidArgumentExceptionThrown, if the alias parameter is set to true, but the provided allocationInfos cannot be overlapped on the system's GPU.

Return Value

  • The resource allocation result.
  • A generator that returns the individual resources that have been allocated.

Parameters

NameDescription
allocationInfoThe description of the resource to allocate.
allocationBehaviorThe behavior controlling what happens if currently there is not enough memory available for the resource.
allocationInfosThe description of the resources to allocate.
aliastrue if the allocator should attempt to overlap the allocations and false otherwise.

See Also

canAlias

https://gpuopen-librariesandsdks.github.io/D3D12MemoryAllocator/html/resource_aliasing.html

https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/resource_aliasing.html