radv: update VK_KHR_create_renderpass2 for Vulkan 1.2
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 15 Oct 2019 07:09:41 +0000 (09:09 +0200)
committerJason Ekstrand <jason@jlekstrand.net>
Wed, 15 Jan 2020 14:42:25 +0000 (08:42 -0600)
Promoted to Vulkan 1.2 with the KHR suffix omitted.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_pass.c

index 85dfd266ab3a3a8894553cb38ee0c519b09cbf11..b35d63eb5b1c26ccb3a01e87fb43fb512b47ffe9 100644 (file)
@@ -4319,10 +4319,10 @@ void radv_CmdBeginRenderPass(
        radv_cmd_buffer_begin_subpass(cmd_buffer, 0);
 }
 
-void radv_CmdBeginRenderPass2KHR(
+void radv_CmdBeginRenderPass2(
     VkCommandBuffer                             commandBuffer,
     const VkRenderPassBeginInfo*                pRenderPassBeginInfo,
-    const VkSubpassBeginInfoKHR*                pSubpassBeginInfo)
+    const VkSubpassBeginInfo*                   pSubpassBeginInfo)
 {
        radv_CmdBeginRenderPass(commandBuffer, pRenderPassBeginInfo,
                                pSubpassBeginInfo->contents);
@@ -4339,10 +4339,10 @@ void radv_CmdNextSubpass(
        radv_cmd_buffer_begin_subpass(cmd_buffer, prev_subpass + 1);
 }
 
-void radv_CmdNextSubpass2KHR(
+void radv_CmdNextSubpass2(
     VkCommandBuffer                             commandBuffer,
-    const VkSubpassBeginInfoKHR*                pSubpassBeginInfo,
-    const VkSubpassEndInfoKHR*                  pSubpassEndInfo)
+    const VkSubpassBeginInfo*                   pSubpassBeginInfo,
+    const VkSubpassEndInfo*                     pSubpassEndInfo)
 {
        radv_CmdNextSubpass(commandBuffer, pSubpassBeginInfo->contents);
 }
@@ -5181,9 +5181,9 @@ void radv_CmdEndRenderPass(
        cmd_buffer->state.subpass_sample_locs = NULL;
 }
 
-void radv_CmdEndRenderPass2KHR(
+void radv_CmdEndRenderPass2(
     VkCommandBuffer                             commandBuffer,
-    const VkSubpassEndInfoKHR*                  pSubpassEndInfo)
+    const VkSubpassEndInfo*                     pSubpassEndInfo)
 {
        radv_CmdEndRenderPass(commandBuffer);
 }
index ae6a3c1718418573bdd1d03a481916a367c70b07..77964a00bb84c6c53d32e73650ee2672d937a084 100644 (file)
@@ -30,7 +30,7 @@
 
 static void
 radv_render_pass_add_subpass_dep(struct radv_render_pass *pass,
-                                const VkSubpassDependency2KHR *dep)
+                                const VkSubpassDependency2 *dep)
 {
        uint32_t src = dep->srcSubpass;
        uint32_t dst = dep->dstSubpass;
@@ -315,8 +315,8 @@ VkResult radv_CreateRenderPass(
        }
 
        for (unsigned i = 0; i < pCreateInfo->dependencyCount; ++i) {
-               /* Convert to a Dependency2KHR */
-               struct VkSubpassDependency2KHR dep2 = {
+               /* Convert to a Dependency2 */
+               struct VkSubpassDependency2 dep2 = {
                        .srcSubpass       = pCreateInfo->pDependencies[i].srcSubpass,
                        .dstSubpass       = pCreateInfo->pDependencies[i].dstSubpass,
                        .srcStageMask     = pCreateInfo->pDependencies[i].srcStageMask,
@@ -336,7 +336,7 @@ VkResult radv_CreateRenderPass(
 }
 
 static unsigned
-radv_num_subpass_attachments2(const VkSubpassDescription2KHR *desc)
+radv_num_subpass_attachments2(const VkSubpassDescription2 *desc)
 {
        const VkSubpassDescriptionDepthStencilResolveKHR *ds_resolve =
                vk_find_struct_const(desc->pNext,
@@ -349,9 +349,9 @@ radv_num_subpass_attachments2(const VkSubpassDescription2KHR *desc)
               (ds_resolve && ds_resolve->pDepthStencilResolveAttachment);
 }
 
-VkResult radv_CreateRenderPass2KHR(
+VkResult radv_CreateRenderPass2(
     VkDevice                                    _device,
-    const VkRenderPassCreateInfo2KHR*           pCreateInfo,
+    const VkRenderPassCreateInfo2*              pCreateInfo,
     const VkAllocationCallbacks*                pAllocator,
     VkRenderPass*                               pRenderPass)
 {
@@ -360,7 +360,7 @@ VkResult radv_CreateRenderPass2KHR(
        size_t size;
        size_t attachments_offset;
 
-       assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR);
+       assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2);
 
        size = sizeof(*pass);
        size += pCreateInfo->subpassCount * sizeof(pass->subpasses[0]);
@@ -419,7 +419,7 @@ VkResult radv_CreateRenderPass2KHR(
 
        p = pass->subpass_attachments;
        for (uint32_t i = 0; i < pCreateInfo->subpassCount; i++) {
-               const VkSubpassDescription2KHR *desc = &pCreateInfo->pSubpasses[i];
+               const VkSubpassDescription2 *desc = &pCreateInfo->pSubpasses[i];
                struct radv_subpass *subpass = &pass->subpasses[i];
 
                subpass->input_count = desc->inputAttachmentCount;