VapourSynth-llvmexpr
Loading...
Searching...
No Matches
vkexpr::VulkanBuffer Struct Reference

#include <llvmexpr/runtime/vulkan/VulkanMemory.hpp>

Public Member Functions

 VulkanBuffer ()=default
 VulkanBuffer (VkBuffer buf, VmaAllocation alloc, VmaAllocationInfo info, VkDeviceSize sz)
 VulkanBuffer (const VulkanBuffer &)=delete
VulkanBufferoperator= (const VulkanBuffer &)=delete
 ~VulkanBuffer ()=default
 VulkanBuffer (VulkanBuffer &&other) noexcept
VulkanBufferoperator= (VulkanBuffer &&other) noexcept
bool isValid () const
void * getMappedData () const

Public Attributes

VkBuffer buffer = VK_NULL_HANDLE
VmaAllocation allocation = VK_NULL_HANDLE
VmaAllocationInfo alloc_info = {}
VkDeviceSize size = 0

Detailed Description

Definition at line 40 of file VulkanMemory.hpp.

Constructor & Destructor Documentation

◆ VulkanBuffer() [1/4]

vkexpr::VulkanBuffer::VulkanBuffer ( )
default

◆ VulkanBuffer() [2/4]

vkexpr::VulkanBuffer::VulkanBuffer ( VkBuffer buf,
VmaAllocation alloc,
VmaAllocationInfo info,
VkDeviceSize sz )
inline

Definition at line 47 of file VulkanMemory.hpp.

49 : buffer(buf), allocation(alloc), alloc_info(info), size(sz) {}
VmaAllocation allocation
VmaAllocationInfo alloc_info

References alloc_info, allocation, buffer, and size.

◆ VulkanBuffer() [3/4]

vkexpr::VulkanBuffer::VulkanBuffer ( const VulkanBuffer & )
delete

References VulkanBuffer().

◆ ~VulkanBuffer()

vkexpr::VulkanBuffer::~VulkanBuffer ( )
default

◆ VulkanBuffer() [4/4]

vkexpr::VulkanBuffer::VulkanBuffer ( VulkanBuffer && other)
inlinenoexcept

Definition at line 55 of file VulkanMemory.hpp.

56 : buffer(other.buffer), allocation(other.allocation),
57 alloc_info(other.alloc_info), size(other.size) {
58 other.buffer = VK_NULL_HANDLE;
59 other.allocation = VK_NULL_HANDLE;
60 other.size = 0;
61 }

References VulkanBuffer().

Member Function Documentation

◆ getMappedData()

void * vkexpr::VulkanBuffer::getMappedData ( ) const
inlinenodiscard

Definition at line 77 of file VulkanMemory.hpp.

77{ return alloc_info.pMappedData; }

References alloc_info.

Referenced by vkexpr::VulkanMemory::flushBuffer(), and vkexpr::VulkanMemory::invalidateBuffer().

◆ isValid()

bool vkexpr::VulkanBuffer::isValid ( ) const
inlinenodiscard

Definition at line 76 of file VulkanMemory.hpp.

76{ return buffer != VK_NULL_HANDLE; }

References buffer.

Referenced by vkexpr::VulkanMemory::destroyBuffer(), and vkexpr::VkExprExecutor::Impl::Stream::freePlaneResources().

◆ operator=() [1/2]

VulkanBuffer & vkexpr::VulkanBuffer::operator= ( const VulkanBuffer & )
delete

References VulkanBuffer().

◆ operator=() [2/2]

VulkanBuffer & vkexpr::VulkanBuffer::operator= ( VulkanBuffer && other)
inlinenoexcept

Definition at line 63 of file VulkanMemory.hpp.

63 {
64 if (this != &other) {
65 buffer = other.buffer;
66 allocation = other.allocation;
67 alloc_info = other.alloc_info;
68 size = other.size;
69 other.buffer = VK_NULL_HANDLE;
70 other.allocation = VK_NULL_HANDLE;
71 other.size = 0;
72 }
73 return *this;
74 }

References alloc_info, allocation, buffer, size, and VulkanBuffer().

Member Data Documentation

◆ alloc_info

VmaAllocationInfo vkexpr::VulkanBuffer::alloc_info = {}

Definition at line 43 of file VulkanMemory.hpp.

43{};

Referenced by getMappedData(), operator=(), and VulkanBuffer().

◆ allocation

VmaAllocation vkexpr::VulkanBuffer::allocation = VK_NULL_HANDLE

◆ buffer

◆ size


The documentation for this struct was generated from the following file: