Aqoole_Hateenaの技術日記

vulkan+raytraceで色々描いてます

Vulkan仕様書勉強会

GL_EXT_nonuniform_qualifierについて

概要 vulkan + ray tracingのチュートリアルのコードを読んだときに気になっていた、GL_EXT_nonuniform_qualifierについて仕様の調査を行う。 仕様書 以下のGitHubが仕様書のようだ。 GLSL/GL_EXT_nonuniform_qualifier.txt at master · KhronosGroup/GLSL ·…

GL_EXT_scalar_block_layoutについて

概要 Vulkan + Ray Tracingのコードを書き始めたときから気になっていたGL_EXT_scalar_block_layoutの拡張機能について調べてみた。 GL_EXT_scalar_block_layoutについて 仕様書はこちら GLSL/GL_EXT_scalar_block_layout.txt at master · KhronosGroup/GLSL…

Input Assemble Stageの指定

Input Assembler Stage Input Assembler Stageでの処理の記述について調べる。 graphics pipelineのstageの概要は以下に記載。 aqoole-hateena.hatenablog.com Vertex Input State レンダリングを行うためには、pipelineにデータを入力する必要がある。 デー…

Blending Stageの指定

Blending Stage Blending Stageではcolor blendの指定を行う。 aqoole-hateena.hatenablog.com color blendとは Blending combines the incoming source fragment’s R, G, B, and A values with the destination R, G, B, and A values of each sample store…

サポートされているsample count取得方法

multisamplingの機能を利用する場合の、supported sample count取得具体例(Android) VkImageFormatProperties imageFormatProp = {}; vkGetPhysicalDeviceImageFormatProperties(physicalDevice, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_TYPE_2D, VK_IMAGE_TILI…

Rasterization Stageの指定

Rasterization Stageでの処理 rasterization stageではrasterizationとmultisamplingの処理が行われる。 それぞれVkPipelineRasterizationStateCreateInfoとVkPipelineMultisampleStateCreateInfoにパラメータを記述する。 VkPipelineRasterizationStateCrea…

Vertex Post-processing Stageの指定

Vertex Post-processing Stage 記事にあるGraphics pipeline diagramのVertex Post-processing stageでは、いわゆるClip and Cullの処理が行われる。 aqoole-hateena.hatenablog.com Clip and Cullとはworld座標から画面に表示される範囲を抽出することであ…

Shader Stageの指定

Shader Stageの指定 pipeline diagramにあるように、pipelineにはshaderを使用することにより処理を行うpipeline shader stageがある。 aqoole-hateena.hatenablog.com pipeline shader stageを指定するには、VkPipelineShaderStageCreateInfoを実装するshad…

Graphics Pipeline基礎知識

Graphics pipelineとは コマンドの入力によって、データが各ステージで処理される生産ラインのこと。 各ステージは実装によってon/offが可能だが、vertex shaderのステージだけは例外なく実装する必要がある。 Block diagram of the Vulkan pipeline Block d…

Bufferの作成とメモリ割り当てについて

vkCreateBuffer() vkCreateBuffer - Create a new buffer object // Provided by VK_VERSION_1_0 VkResult vkCreateBuffer( VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer);vkCreat…

ImageViewの作成について

vkCreateImageView ImageViewはvkCreateImageView()で作成できるが、作成にはVkImageViewCreateInfo構造体に必要な情報をインプットする必要がある。 vkCreateImageView(3) VkImageViewCreateInfo VkImageViewCreateInfo - Structure specifying parameters …

Render Passの作成について

Render passの作成 render passの作成に当たりattachmentとsubpassの記述が必要。subpassとはattachmentにアクセスするrender passのsubsetである。 Render PassとFramebufferについて - Aqoole_Hateenaの技術日記 subpassの記述にもattachmentの記述が必要…

Image Layout Transitionsについて

Image Layout Transitions memory dependenciesの例としてImage Layout Transitions*1がある。 Image Layouts 仕様書にはこのように書かれている。Vulkan® 1.2.202 - A Specification (with all registered Vulkan extensions) Images are stored in impleme…

synchronizationとdependenciesについて

Synchronization 仕様書にはこのように書かれている。Vulkan® 1.2.202 - A Specification (with all registered Vulkan extensions) Synchronization of access to resources is primarily the responsibility of the application in Vulkan. The order of e…

BuffersとBuffer Viewsについて

Buffersについて 仕様書によるとVulkan® 1.2.202 - A Specification (with all registered Vulkan extensions) Vulkan supports two primary resource types: buffers and images. Resources are views of memory with associated formatting and dimensiona…

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 bind…

Render Pass, SubpassとFramebufferについて

Render Passについて 仕様書には次のように書かれている。 Vulkan® 1.2.202 - A Specification (with all registered Vulkan extensions) Draw commands must be recorded within a render pass instance. Each render pass instance defines a set of image…