tp::ImageView class

Represents the view of a subresource range of tp::Image.

Optionally, it can be made to interpret the data in a different format than that of the viewed tp::Image or with a different tp::ComponentMapping.

Constructors, destructors, conversion operators

ImageView()
Constructs a null tp::ImageView.

Public functions

auto createView(ImageViewSetup subviewSetup) -> ImageView
Creates another view of the viewed image relative to this view.
auto getExtent(uint32_t mipLevel = 0) const -> Extent3D
Returns the extent of a specific mip level of the image view.
auto getFormat() const -> Format
Returns the format of the image view.
auto getSampleLevel() const -> MultisampleLevel
Returns the multisampling level of the image view.
auto getViewType() const -> ImageViewType
Returns the type of the image view.
auto getWholeRange() const -> ImageSubresourceRange
Returns the image subresource range encompassing the entire range of the image view.
auto isNull() const -> bool
Returns true if the image view is null and does not view any resource.
auto viewsJobLocalImage() const -> bool
Returns true if the instance views a job-local image. Returns false if it views a persistent one.
auto vkGetImageViewHandle() const -> VkImageViewHandle
Returns the associated Vulkan VkImageView handle if it exists, VK_NULL_HANDLE otherwise.
auto vkResolveImageHandle(uint32_t* baseMipLevel, uint32_t* baseArrayLevel) const -> VkImageHandle
Resolves and returns the underlying VkImage handle of this view or VK_NULL_HANDLE if it doesn't exist.

Friends

auto operator==(const ImageView&, const ImageView&) -> bool
Equality operator for tp::ImageView.

Function documentation

ImageView tp::ImageView::createView(ImageViewSetup subviewSetup)

Creates another view of the viewed image relative to this view.

Parameters
subviewSetup The setup structure describing the view.

ImageSubresourceRange tp::ImageView::getWholeRange() const

Returns the image subresource range encompassing the entire range of the image view.

VkImageViewHandle tp::ImageView::vkGetImageViewHandle() const

Returns the associated Vulkan VkImageView handle if it exists, VK_NULL_HANDLE otherwise.

VkImageHandle tp::ImageView::vkResolveImageHandle(uint32_t* baseMipLevel, uint32_t* baseArrayLevel) const

Resolves and returns the underlying VkImage handle of this view or VK_NULL_HANDLE if it doesn't exist.

Parameters
baseMipLevel An output parameter to which the base mip level of the view will be set if the underlying image exists.
baseArrayLevel An output parameter to which the base array level of the view will be set if the underlying image exists.