3#include "../Interface/Buffer.hpp"
5#include <vulkan/vulkan.h>
26 unsigned int GetSize()
const final;
72 VkDeviceMemory deviceMemory;
77 bool temporaryAllocation;
79 VkPipelineStageFlags readMask;
80 VkPipelineStageFlags lastWrite;
A buffer containing GPU accessible data.
Definition: Buffer.hpp:8
BufferUsage
How the buffer is going to be used.
Definition: Buffer.hpp:11
BufferUsage bufferUsage
How the buffer will be used.
Definition: Buffer.hpp:54
A large buffer from which buffers are sub-allocated.
Definition: BufferAllocator.hpp:21
Vulkan implementation of Buffer.
Definition: VulkanBuffer.hpp:13
uint32_t GetOffset() const
Get the offset into the raw buffer.
Definition: VulkanBuffer.cpp:41
void SetLastWriteStage(VkPipelineStageFlags pipelineStage)
Set which pipeline stage last wrote to the buffer.
Definition: VulkanBuffer.cpp:61
void Reset(BufferUsage bufferUsage, const BufferAllocation &allocation) final
Reset the buffer.
Definition: VulkanBuffer.cpp:19
~VulkanBuffer() final
Destructor.
Definition: VulkanBuffer.cpp:13
VkPipelineStageFlags GetReadMask() const
Get which pipeline stages have read the buffer since the last write.
Definition: VulkanBuffer.cpp:45
void SetReadMaskStage(VkPipelineStageFlags pipelineStage)
Set a pipeline stage having read the buffer since the last write.
Definition: VulkanBuffer.cpp:49
VkPipelineStageFlags GetLastWriteStage() const
Get the shader stage which last wrote to the buffer.
Definition: VulkanBuffer.cpp:57
void ClearReadMask()
Clear the read mask.
Definition: VulkanBuffer.cpp:53
VkBuffer GetBuffer() const
Get the internal Vulkan buffer.
Definition: VulkanBuffer.cpp:37
VulkanBuffer(Buffer::BufferUsage bufferUsage, const BufferAllocation &allocation)
Create new Vulkan buffer.
Definition: VulkanBuffer.cpp:9
unsigned int GetSize() const final
Get the size of the buffer.
Definition: VulkanBuffer.cpp:33
Definition: Editor.hpp:18
An allocation.
Definition: BufferAllocator.hpp:36