summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-10-05 20:30:53 -0700
committerJason Ekstrand <[email protected]>2015-10-05 20:30:53 -0700
commit8e1ef639b6af17cfde2234fb2bd60c9c45cf265b (patch)
tree8359e63776f4f371b47c340b929373d39623e307
parent757166592e5e26dc226849f94d1460db28a35170 (diff)
vk/0.170.2: Add the subpass field to VkCmdBufferBeginInfo
-rw-r--r--include/vulkan/vulkan.h1
-rw-r--r--src/vulkan/anv_cmd_buffer.c7
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);