[Mesa-dev] [PATCH] radv: fix implementation of VK_KHR_create_renderpass2 for multiviews

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Jul 13 12:14:52 UTC 2018


The Vulkan 1.1.80 spec says:

"viewMask has the same effect for the described subpass as
 VkRenderPassMultiviewCreateInfo::pViewMasks has on each
 corresponding subpass."

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/amd/vulkan/radv_pass.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/amd/vulkan/radv_pass.c b/src/amd/vulkan/radv_pass.c
index 2191093391..f2884ffc01 100644
--- a/src/amd/vulkan/radv_pass.c
+++ b/src/amd/vulkan/radv_pass.c
@@ -226,16 +226,6 @@ VkResult radv_CreateRenderPass2KHR(
 	pass->subpass_count = pCreateInfo->subpassCount;
 	pass->attachments = (void *) pass + attachments_offset;
 
-	vk_foreach_struct(ext, pCreateInfo->pNext) {
-		switch(ext->sType) {
-		case  VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR:
-			multiview_info = ( VkRenderPassMultiviewCreateInfoKHR*)ext;
-			break;
-		default:
-			break;
-		}
-	}
-
 	for (uint32_t i = 0; i < pCreateInfo->attachmentCount; i++) {
 		struct radv_render_pass_attachment *att = &pass->attachments[i];
 
@@ -280,8 +270,7 @@ VkResult radv_CreateRenderPass2KHR(
 
 		subpass->input_count = desc->inputAttachmentCount;
 		subpass->color_count = desc->colorAttachmentCount;
-		if (multiview_info)
-			subpass->view_mask = multiview_info->pViewMasks[i];
+		subpass->view_mask = desc->viewMask;
 
 		if (desc->inputAttachmentCount > 0) {
 			subpass->input_attachments = p;
-- 
2.18.0



More information about the mesa-dev mailing list