|
Lluvia
|
Objects to manage images. More...
#include <Image.h>


Public Member Functions | |
| Image ()=delete | |
| Image (const Image &)=delete | |
| Image (Image &&)=delete | |
| ~Image () | |
| Image & | operator= (const Image &)=delete |
| Image & | operator= (Image &&)=delete |
| ll::ObjectType | getType () const noexcept override |
| Gets the object type. More... | |
| ll::MemoryAllocationInfo | getAllocationInfo () const noexcept |
| Gets the allocation information. More... | |
| const std::shared_ptr< ll::Memory > & | getMemory () const noexcept |
| Gets the memory this image was allocated from. More... | |
| uint64_t | getSize () const noexcept |
| Gets the memory allocation size in bytes. More... | |
| uint64_t | getMinimumSize () const noexcept |
| Gets the minimum number of bytes to store the image contiguously in memory. More... | |
| const ll::ImageDescriptor & | getDescriptor () const noexcept |
| Gets the descriptor. More... | |
| ll::ImageUsageFlags | getUsageFlags () const noexcept |
| Gets the Vulkan image usage flags. More... | |
| uint32_t | getUsageFlagsUnsafe () const noexcept |
| Gets the usage flags casted to an integer type. More... | |
| ll::ImageLayout | getLayout () const noexcept |
| Gets the Vulkan image layout. More... | |
| ll::ImageTiling | getTiling () const noexcept |
| Gets the vulkan image tiling. More... | |
| ll::ChannelType | getChannelType () const noexcept |
| Gets the channel type. More... | |
| uint64_t | getChannelTypeSize () const noexcept |
| Gets the channel type size. More... | |
| template<typename T = ll::ChannelCount> | |
| T | getChannelCount () const noexcept |
| Gets the channel count. More... | |
| uint32_t | getWidth () const noexcept |
| Gets the image width in pixels. More... | |
| uint32_t | getHeight () const noexcept |
| Gets the image height in pixels. More... | |
| uint32_t | getDepth () const noexcept |
| Gets the image depth in pixels. More... | |
| ll::vec3ui | getShape () const noexcept |
| Gets the shape of the image. More... | |
| std::shared_ptr< ll::ImageView > | createImageView (const ll::ImageViewDescriptor &tDescriptor) |
| Creates an image view from this image. More... | |
| void | changeImageLayout (const ll::ImageLayout newLayout) |
| Immediately changes the image layout. More... | |
| void | clear () |
| Immediately clears the image pixels to zero. More... | |
| void | copyTo (ll::Image &dst) |
| Immediately copies the content of this image into the destination. More... | |
Public Member Functions inherited from ll::Object | |
| Object ()=default | |
| Default constructor. More... | |
| Object (const Object &)=delete | |
| Copy constructor. More... | |
| Object (Object &&)=delete | |
| Move constructor. More... | |
| virtual | ~Object ()=default |
| Object & | operator= (const Object &)=delete |
| Copy assignment. More... | |
| Object & | operator= (Object &&)=delete |
| Move assignment. More... | |
Friends | |
| class | ll::CommandBuffer |
| class | ll::ComputeNode |
| class | ll::ComputeGraph |
| class | ll::ImageView |
| class | ll::Memory |
| class | ll::Session |
Objects to manage images.
Image objects are created by calling ll::Memory::createImage using a valid ll::ImageDescriptor.
Images can be passed directly to compute nodes or through ll::ImageView objects. In the first case, the object is mapped to a GLSL image type while in the second case, it is mapped to sampler type.
TODO
|
delete |
|
delete |
|
delete |
| ll::Image::~Image | ( | ) |
| void ll::Image::changeImageLayout | ( | const ll::ImageLayout | newLayout | ) |
Immediately changes the image layout.
This method creates a command buffer and submits it to change the layout of the image. Execution is blocked until the layout change is completed.
| [in] | newLayout | The new layout |
| void ll::Image::clear | ( | ) |
Immediately clears the image pixels to zero.
This method creates a command buffer and sumbits it to clear all the pixels in the underlying image to zero. Execution is blocked until the operation is completed.
| void ll::Image::copyTo | ( | ll::Image & | dst | ) |
Immediately copies the content of this image into the destination.
This method creates a command buffer and sumbits it to copy the content of this image into dst. No valiation of destination image shape is performed. Execution is blocked until the operation is completed.
| [in] | dst | The destination image. |
| std::shared_ptr<ll::ImageView> ll::Image::createImageView | ( | const ll::ImageViewDescriptor & | tDescriptor | ) |
Creates an image view from this image.
| [in] | tDescriptor | The image view descriptor |
|
noexcept |
Gets the allocation information.
|
inlinenoexcept |
Gets the channel count.
| T | Type of the return value. Defaults to ll::ChannelCount. |
|
noexcept |
Gets the channel type.
|
noexcept |
Gets the channel type size.
|
noexcept |
Gets the image depth in pixels.
|
noexcept |
Gets the descriptor.
|
noexcept |
Gets the image height in pixels.
|
noexcept |
Gets the Vulkan image layout.
The layout is changed through invocations of Session::changeImageLayout or CommandBuffer::changeImageLayout.
See https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#_vkimagelayout_3
|
noexcept |
Gets the memory this image was allocated from.
|
noexcept |
Gets the minimum number of bytes to store the image contiguously in memory.
This methods is equivalent to:
uint64_t minimumSize = getWidth() *
getHeight() *
getDepth() *
getChannelTypeSize() *
static_cast<uint64_t>(getChannelCount())
|
noexcept |
Gets the shape of the image.
The vec3ui object returned must be interpreted as follows:
x : width y : height z : depth
|
noexcept |
Gets the memory allocation size in bytes.
This methods is equivalent to calling getAllocationInfo().size.
The size reported by this method includes any row stride and padding needed to store the image in memory according to the device. Use :getMinimumSize: to get the minimum amount of memory to allocate all pixels contiguously in memory without any stride.
|
noexcept |
Gets the vulkan image tiling.
|
overridevirtualnoexcept |
Gets the object type.
This method can be used for safely down-casting pointers of ll::Object type to its children.
Implements ll::Object.
|
noexcept |
Gets the Vulkan image usage flags.
See https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VkImageUsageFlagBits for more information.
|
noexcept |
Gets the usage flags casted to an integer type.
Please do not use this method. It's for internal use only.
|
noexcept |
Gets the image width in pixels.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |