Aqoole_Hateenaの技術日記

vulkan+raytraceで色々描いてます

ImageとImageViewについて

Imageについて

仕様書によるとVulkan® 1.2.202 - A Specification (with all registered Vulkan extensions)

Images represent multidimensional - up to 3 - arrays of data which can be used for various purposes (e.g. attachments, textures), by binding them to a graphics or compute pipeline via descriptor sets, or by directly specifying them as parameters to certain commands.

とある。画像に限らず、多次元配列のデータをimageとよび、imageはdescriptor setsやcommandを通じてpipelineにbindされる。

ImageViewについて

仕様書には
Vulkan® 1.2.202 - A Specification (with all registered Vulkan extensions)

Image objects are not directly accessed by pipeline shaders for reading or writing image data. Instead, image views representing contiguous ranges of the image subresources and containing additional metadata are used for that purpose. Views must be created on images of compatible types, and must represent a valid subset of image subresources.

とあり、Image objectそのものはshadersから直接アクセスできないので、代わりにimage viewが連続したデータと追加のメタデータを表す。

framebufferについて記事をまとめたときにRender PassとFramebufferについて - Aqoole_Hateenaの技術日記

framebufferはattachmentであるVkImageViewを表すとある。

と書いたが、これはつまりattachmentは例えばcolor image bufferであったりdepth bufferであったりなので、それらのbuffer(image)がimageviewで表されていると読むことができる。