From 8e1ef639b6af17cfde2234fb2bd60c9c45cf265b Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 5 Oct 2015 20:30:53 -0700 Subject: [PATCH] vk/0.170.2: Add the subpass field to VkCmdBufferBeginInfo --- include/vulkan/vulkan.h | 1 + src/vulkan/anv_cmd_buffer.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 25d0f829f77..48c4d195b2d 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -1937,6 +1937,7 @@ typedef struct { const void* pNext; VkCmdBufferOptimizeFlags flags; VkRenderPass renderPass; + uint32_t subpass; VkFramebuffer framebuffer; } VkCmdBufferBeginInfo; diff --git a/src/vulkan/anv_cmd_buffer.c b/src/vulkan/anv_cmd_buffer.c index cab916c1383..eb70abfeb76 100644 --- a/src/vulkan/anv_cmd_buffer.c +++ b/src/vulkan/anv_cmd_buffer.c @@ -202,9 +202,10 @@ VkResult anv_BeginCommandBuffer( cmd_buffer->state.pass = anv_render_pass_from_handle(pBeginInfo->renderPass); - /* FIXME: We shouldn't be starting on the first subpass */ - anv_cmd_buffer_begin_subpass(cmd_buffer, - &cmd_buffer->state.pass->subpasses[0]); + struct anv_subpass *subpass = + &cmd_buffer->state.pass->subpasses[pBeginInfo->subpass]; + + anv_cmd_buffer_begin_subpass(cmd_buffer, subpass); } anv_cmd_buffer_emit_state_base_address(cmd_buffer); -- 2.30.2