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;
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;
Exceptions¶
| Name | Thrown on |
|---|---|
InvalidArgumentException | Thrown, 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¶
| Name | Description |
|---|---|
| allocationInfo | The description of the resource to allocate. |
| allocationBehavior | The behavior controlling what happens if currently there is not enough memory available for the resource. |
| allocationInfos | The description of the resources to allocate. |
| alias | true 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