vk/0.170.2: Add the subpass field to VkCmdBufferBeginInfo
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 6 Oct 2015 03:30:53 +0000 (20:30 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 6 Oct 2015 03:30:53 +0000 (20:30 -0700)
include/vulkan/vulkan.h
src/vulkan/anv_cmd_buffer.c

index 25d0f829f77b1c1e5a3e98f0c661bc448b60ae83..48c4d195b2dbbcbb8e36429895dd28cb29071f18 100644 (file)
@@ -1937,6 +1937,7 @@ typedef struct {
     const void*                                 pNext;
     VkCmdBufferOptimizeFlags                    flags;
     VkRenderPass                                renderPass;
+    uint32_t                                    subpass;
     VkFramebuffer                               framebuffer;
 } VkCmdBufferBeginInfo;
 
index cab916c138305176cdcceb6bf867106abe570dcc..eb70abfeb76395c8b56381c951e2c492297775ef 100644 (file)
@@ -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);