首页 > 其他 > 详细

Vulkan SDK 之Render Pass

时间:2020-02-06 20:57:31      阅读:116      评论:0      收藏:0      [点我收藏+]

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(渲染通道)是什么意思?

2、计算机图形里面的RenderingPass(渲染通道)我这样理解对吗?

3、Vulkan - 高性能渲染

Vulkan SDK 之Render Pass

原文:https://www.cnblogs.com/khacker/p/12269272.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!