Class VulkanBuffer#
Defined in File VulkanBuffer.h
Inheritance Relationships#
Base Type#
public TRAP::Graphics::Buffer
(Class Buffer)
Class Documentation#
-
class VulkanBuffer : public TRAP::Graphics::Buffer#
Public Functions
-
explicit VulkanBuffer(const RendererAPI::BufferDesc &desc)#
Constructor.
- Parameters:
desc – Buffer description.
-
~VulkanBuffer() override#
Destructor.
-
consteval VulkanBuffer(const VulkanBuffer&) noexcept = delete#
Copy constructor.
-
consteval VulkanBuffer &operator=(const VulkanBuffer&) noexcept = delete#
Copy assignment operator.
-
VulkanBuffer(VulkanBuffer&&) noexcept = default#
Move constructor.
-
VulkanBuffer &operator=(VulkanBuffer&&) noexcept = default#
Move assignment operator.
-
constexpr VkBuffer GetVkBuffer() const noexcept#
Retrieve the VkBuffer handle.
- Returns:
VkBuffer handle.
-
constexpr VkBufferView GetStorageTexelView() const noexcept#
Retrieve the storage texel view.
- Returns:
VkBufferView for storage texel.
-
constexpr VkBufferView GetUniformTexelView() const noexcept#
Retrieve the uniform texel view.
- Returns:
VkBufferView for uniform texel.
-
constexpr u64 GetOffset() const noexcept#
Retrieve the (aligned) byte offset to the first element in the buffer.
- Returns:
Byte offset to the first element in the buffer.
-
virtual bool MapBuffer(const RendererAPI::ReadRange &range = {}) override#
Map a region of the buffer to the CPU.
Note
MapBuffer must not be called if memory usage is GPU only.
- Parameters:
range – Optional range of the buffer to map. Default: Whole buffer.
- Returns:
Returns true if the buffer was successfully mapped, false otherwise.
-
virtual void UnMapBuffer() override#
Unmap CPU mapped memory region.
Note
UnMapBuffer must not be called if memory usage is GPU only.
-
explicit VulkanBuffer(const RendererAPI::BufferDesc &desc)#