From d5e30872cab029b8df1af70e8d528d77351a6f7e Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 24 Mar 2020 18:30:17 -0500 Subject: [PATCH] anv: Use ANV_FROM_HANDLE for pInheritanceInfo fields Reviewed-by: Rafael Antognolli Part-of: --- src/intel/vulkan/genX_cmd_buffer.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 02513dae1df..4311a5d00fd 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -1613,14 +1613,18 @@ genX(BeginCommandBuffer)( if (cmd_buffer->usage_flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT) { assert(pBeginInfo->pInheritanceInfo); - cmd_buffer->state.pass = - anv_render_pass_from_handle(pBeginInfo->pInheritanceInfo->renderPass); - cmd_buffer->state.subpass = - &cmd_buffer->state.pass->subpasses[pBeginInfo->pInheritanceInfo->subpass]; + ANV_FROM_HANDLE(anv_render_pass, pass, + pBeginInfo->pInheritanceInfo->renderPass); + struct anv_subpass *subpass = + &pass->subpasses[pBeginInfo->pInheritanceInfo->subpass]; + ANV_FROM_HANDLE(anv_framebuffer, framebuffer, + pBeginInfo->pInheritanceInfo->framebuffer); + + cmd_buffer->state.pass = pass; + cmd_buffer->state.subpass = subpass; /* This is optional in the inheritance info. */ - cmd_buffer->state.framebuffer = - anv_framebuffer_from_handle(pBeginInfo->pInheritanceInfo->framebuffer); + cmd_buffer->state.framebuffer = framebuffer; result = genX(cmd_buffer_setup_attachments)(cmd_buffer, cmd_buffer->state.pass, NULL); -- 2.30.2