diff options
-rw-r--r-- | include/vulkan/vulkan.h | 1 | ||||
-rw-r--r-- | 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); |