8 #ifndef LLUVIA_CORE_IMAGE_IMAGE_H_
9 #define LLUVIA_CORE_IMAGE_IMAGE_H_
38 class ImageViewDescriptor;
74 public std::enable_shared_from_this<ll::Image> {
278 Image(const std::shared_ptr<
ll::vulkan::Device>& device,
279 const vk::
Image& vkImage,
281 const std::shared_ptr<
ll::
Memory>& memory,
285 std::shared_ptr<
ll::vulkan::Device> m_device;
296 std::shared_ptr<
ll::
Memory> m_memory;
300 friend class
ll::ComputeGraph;
ImageDescriptor class and related enumerations.
Structures and methods for storing memory allocation information.
Object class and related enums.
Class for command buffer.
Definition: CommandBuffer.h:63
Class representing compute nodes.
Definition: ComputeNode.h:38
Stores all relevant information for creating ll::Image objects.
Definition: ImageDescriptor.h:189
T getChannelCount() const noexcept
Gets the channel count.
Definition: ImageDescriptor.h:336
Descriptor for ll::ImageView objects.
Definition: ImageViewDescriptor.h:41
Represents portions of a ll::Image to be sent as parameter to a GLSL shader.
Definition: ImageView.h:149
Objects to manage images.
Definition: Image.h:74
ll::ImageLayout getLayout() const noexcept
Gets the Vulkan image layout.
uint64_t getSize() const noexcept
Gets the memory allocation size in bytes.
void changeImageLayout(const ll::ImageLayout newLayout)
Immediately changes the image layout.
ll::ImageTiling getTiling() const noexcept
Gets the vulkan image tiling.
ll::vec3ui getShape() const noexcept
Gets the shape of the image.
ll::MemoryAllocationInfo getAllocationInfo() const noexcept
Gets the allocation information.
ll::ImageUsageFlags getUsageFlags() const noexcept
Gets the Vulkan image usage flags.
uint32_t getDepth() const noexcept
Gets the image depth in pixels.
Image & operator=(const Image &)=delete
ll::ObjectType getType() const noexcept override
Gets the object type.
void clear()
Immediately clears the image pixels to zero.
std::shared_ptr< ll::ImageView > createImageView(const ll::ImageViewDescriptor &tDescriptor)
Creates an image view from this image.
void copyTo(ll::Image &dst)
Immediately copies the content of this image into the destination.
ll::ChannelType getChannelType() const noexcept
Gets the channel type.
T getChannelCount() const noexcept
Gets the channel count.
Definition: Image.h:197
uint32_t getHeight() const noexcept
Gets the image height in pixels.
uint32_t getWidth() const noexcept
Gets the image width in pixels.
const std::shared_ptr< ll::Memory > & getMemory() const noexcept
Gets the memory this image was allocated from.
Image(const Image &)=delete
uint32_t getUsageFlagsUnsafe() const noexcept
Gets the usage flags casted to an integer type.
uint64_t getChannelTypeSize() const noexcept
Gets the channel type size.
Image & operator=(Image &&)=delete
uint64_t getMinimumSize() const noexcept
Gets the minimum number of bytes to store the image contiguously in memory.
const ll::ImageDescriptor & getDescriptor() const noexcept
Gets the descriptor.
Class to manage allocation of objects into a specific type of memory.
Definition: Memory.h:92
Base class for all types that can be used in computer shaders.
Definition: Object.h:94
Class that contains all the state required to run compute operations on a compute device.
Definition: Session.h:51
ImageLayout
Definition: ImageLayout.h:16
ObjectType
Object types.
Definition: Object.h:29
ChannelType
Supported image channel types.
Definition: ImageDescriptor.h:33
ImageTiling
Definition: ImageTiling.h:16
ChannelCount
Supported image channel count.
Definition: ImageDescriptor.h:53
Structure to hold the allocation information of objects in memory.
Definition: MemoryAllocationInfo.h:19