From: Jason Ekstrand Date: Tue, 6 Oct 2015 03:30:53 +0000 (-0700) Subject: vk/0.170.2: Add the subpass field to VkCmdBufferBeginInfo X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8e1ef639b6af17cfde2234fb2bd60c9c45cf265b;p=mesa.git vk/0.170.2: Add the subpass field to VkCmdBufferBeginInfo --- 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);