Lluvia
|
Represents portions of a ll::Image to be sent as parameter to a GLSL shader. More...
#include <ImageView.h>
Public Member Functions | |
ImageView ()=delete | |
ImageView (const ImageView &)=delete | |
ImageView (ImageView &&)=delete | |
~ImageView () | |
ImageView & | operator= (const ImageView &)=delete |
ImageView & | operator= (ImageView &&)=delete |
ll::ObjectType | getType () const noexcept override |
Gets the object type. More... | |
const std::shared_ptr< ll::Image > & | getImage () const noexcept |
Gets the parent ll::Image this object was created from. More... | |
const std::shared_ptr< ll::Memory > & | getMemory () const noexcept |
Gets the memory the underlying ll::Image was allocated from. More... | |
ll::MemoryAllocationInfo | getAllocationInfo () const noexcept |
Gets the allocation information of the underlying ll::Image object. 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 & | getImageDescriptor () const noexcept |
Gets the image 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 view width in pixels. More... | |
uint32_t | getHeight () const noexcept |
Gets the image view height in pixels. More... | |
uint32_t | getDepth () const noexcept |
Gets the image view depth in pixels. More... | |
ll::vec3ui | getShape () const noexcept |
Gets the shape of the image view. More... | |
const ll::ImageViewDescriptor & | getDescriptor () const noexcept |
Gets the image view descriptor. More... | |
void | changeImageLayout (const ll::ImageLayout newLayout) |
Immediately changes the layout of the underlying ll::Image object. More... | |
void | clear () |
Immediately clears the image pixels to zero. More... | |
void | copyTo (ll::ImageView &dst) |
Immediately copies the content of this image view into the destination. More... | |
![]() | |
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 | Image |
class | ComputeNode |
Represents portions of a ll::Image to be sent as parameter to a GLSL shader.
Image views are created from a ll::Image object provided a ll::ImageViewDescriptor.
ImageView objects are mapped to GLSL objects as follows:
GLSL image
object if the ImageView was created with a ImageViewDescriptor with setIsSampled(false)
. For this case, image load/store operations should be used to access pixel data. See https://www.khronos.org/opengl/wiki/Image_Load_Store for more information.
For instance, an ImageView created as
is accessed in a GLSL compute shader as
GLSL sampler
object if the ImageView was created with a ImageDescriptor with setIsSampled(true)
. In this case texture lookup and write operations should be used. See https://www.khronos.org/opengl/wiki/Sampler_(GLSL) for more information.
For instance, an ImageView created as
is accessed in a GLSL compute shader as
|
delete |
|
delete |
|
delete |
ll::ImageView::~ImageView | ( | ) |
void ll::ImageView::changeImageLayout | ( | const ll::ImageLayout | newLayout | ) |
Immediately changes the layout of the underlying ll::Image object.
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::ImageView::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::ImageView::copyTo | ( | ll::ImageView & | dst | ) |
Immediately copies the content of this image view into the destination.
This method creates a command buffer and sumbits it to copy the content of this image view underlying Image object into dst Image object. No valiation of destination image shape is performed. Execution is blocked until the operation is completed.
[in] | dst | The destination image view.. |
|
noexcept |
Gets the allocation information of the underlying ll::Image object.
|
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 view depth in pixels.
|
noexcept |
Gets the image view descriptor.
|
noexcept |
Gets the image view height in pixels.
|
noexcept |
|
noexcept |
Gets the image descriptor.
|
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 the underlying ll::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 view.
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 view width in pixels.
|
friend |
|
friend |