Vulkan SDK 之Render Pass
Create a Render Pass
A render pass describes the scope of a rendering operation by specifying the collection of attachments, subpasses, and dependencies used during the rendering operation. A render pass consists of at least one subpass. The communication of this information to the driver allows the driver to know what to expect when rendering begins and to set up the hardware optimally for the rendering operation.
Image Layout Transition
The Need for Alternate Memory Access Patterns
Vulkan Control Over the Layout
1、Vulkan有三种方式来修改layout
Memory Barrier Command (via vkCmdPipelineBarrier)
Render Pass final layout specification
Render Pass subpass layout specification
Image Layout Transitions in the Samples
VkRenderPassCreateInfo rp_info = {}; rp_info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO; rp_info.pNext = NULL; rp_info.attachmentCount = 2; rp_info.pAttachments = attachments; rp_info.subpassCount = 1; rp_info.pSubpasses = &subpass; rp_info.dependencyCount = 1; rp_info.pDependencies = &subpass_dependency; res = vkCreateRenderPass(info.device, &rp_info, NULL, &info.render_pass);
Reference
1、计算机图形里面的RenderingPass(渲染通道)是什么意思?