vulkan-1.0.0: Split out command buffer inheritance info
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 14 Jan 2016 15:45:15 +0000 (07:45 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 14 Jan 2016 15:45:15 +0000 (07:45 -0800)
include/vulkan/vulkan.h
src/vulkan/anv_cmd_buffer.c

index a1b81b6a50fecf3a32c922707a056608dfea22e2..0aefccf1d5c10f5402f854884ce1b7d5b7f48746 100644 (file)
@@ -187,13 +187,14 @@ typedef enum VkStructureType {
     VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
     VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
     VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
-    VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 41,
-    VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 42,
-    VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 43,
-    VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 44,
-    VK_STRUCTURE_TYPE_MEMORY_BARRIER = 45,
-    VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 46,
-    VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 47,
+    VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
+    VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
+    VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
+    VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
+    VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
+    VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
+    VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
+    VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
     VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
     VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
     VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
@@ -2034,16 +2035,22 @@ typedef struct VkCommandBufferAllocateInfo {
     uint32_t                                    commandBufferCount;
 } VkCommandBufferAllocateInfo;
 
-typedef struct VkCommandBufferBeginInfo {
+typedef struct VkCommandBufferInheritanceInfo {
     VkStructureType                             sType;
     const void*                                 pNext;
-    VkCommandBufferUsageFlags                   flags;
     VkRenderPass                                renderPass;
     uint32_t                                    subpass;
     VkFramebuffer                               framebuffer;
     VkBool32                                    occlusionQueryEnable;
     VkQueryControlFlags                         queryFlags;
     VkQueryPipelineStatisticFlags               pipelineStatistics;
+} VkCommandBufferInheritanceInfo;
+
+typedef struct VkCommandBufferBeginInfo {
+    VkStructureType                             sType;
+    const void*                                 pNext;
+    VkCommandBufferUsageFlags                   flags;
+    const VkCommandBufferInheritanceInfo*       pInheritanceInfo;
 } VkCommandBufferBeginInfo;
 
 typedef struct VkBufferCopy {
index 91e97372b2efd51556c1e9ae69c8f56bdba0af5a..8cf4dc7202cee8401c99d7751aae5d23a03f3450 100644 (file)
@@ -304,12 +304,12 @@ VkResult anv_BeginCommandBuffer(
    if (cmd_buffer->usage_flags &
        VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT) {
       cmd_buffer->state.framebuffer =
-         anv_framebuffer_from_handle(pBeginInfo->framebuffer);
+         anv_framebuffer_from_handle(pBeginInfo->pInheritanceInfo->framebuffer);
       cmd_buffer->state.pass =
-         anv_render_pass_from_handle(pBeginInfo->renderPass);
+         anv_render_pass_from_handle(pBeginInfo->pInheritanceInfo->renderPass);
 
       struct anv_subpass *subpass =
-         &cmd_buffer->state.pass->subpasses[pBeginInfo->subpass];
+         &cmd_buffer->state.pass->subpasses[pBeginInfo->pInheritanceInfo->subpass];
 
       anv_cmd_buffer_begin_subpass(cmd_buffer, subpass);
    }