|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
Supplies the memory a buffer is bound into. More...
#include "donner/gpu/vulkan/VulkanBufferAllocator.h"
Public Member Functions | |
| virtual Result< BufferAllocation > | allocate (const VulkanApi &api, VkDevice device, VkBuffer buffer, std::string_view label)=0 |
Provides memory for buffer and binds it. | |
| virtual void | release (const VulkanApi &api, VkDevice device, BufferAllocation &allocation)=0 |
| Releases an allocation obtained from allocate. | |
Supplies the memory a buffer is bound into.
Every buffer this backend allocates is host-visible, host-coherent, and persistently mapped: queue writes are a memcpy and readback needs no staging. An implementation must preserve that, because the rest of the backend reads and writes buffers straight through BufferAllocation::mapped with no flush or invalidate of its own.
|
nodiscardpure virtual |
Provides memory for buffer and binds it.
| api | Resolved device entry points. |
| device | Device owning buffer. |
| buffer | Buffer to bind memory into. |
| label | Buffer label, for failure messages. |
Implemented in donner::gpu::vulkan::DedicatedBufferAllocator.
|
pure virtual |
Releases an allocation obtained from allocate.
| api | Resolved device entry points. |
| device | Device owning the allocation. |
| allocation | Allocation to release; left cleared. |
Implemented in donner::gpu::vulkan::DedicatedBufferAllocator.