From 8cb2e27c62ab958f028eb2887b84a17e95ffe8ec Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Sun, 4 Oct 2015 09:26:25 -0700 Subject: [PATCH] vk/0.170.2: Update VkRenderPassBeginInfo Rename members: attachmentCount -> clearValueCount pAttachmentClearValues -> pClearValues --- include/vulkan/vulkan.h | 4 ++-- src/vulkan/anv_meta.c | 11 +++++++---- src/vulkan/gen7_cmd_buffer.c | 2 +- src/vulkan/gen8_cmd_buffer.c | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 6b8ca6022ee..16ed3f8dd67 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -2020,8 +2020,8 @@ typedef struct { VkRenderPass renderPass; VkFramebuffer framebuffer; VkRect2D renderArea; - uint32_t attachmentCount; - const VkClearValue* pAttachmentClearValues; + uint32_t clearValueCount; + const VkClearValue* pClearValues; } VkRenderPassBeginInfo; typedef struct { diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c index d7efdf69b62..11b8557805c 100644 --- a/src/vulkan/anv_meta.c +++ b/src/vulkan/anv_meta.c @@ -428,6 +428,9 @@ anv_cmd_buffer_clear_attachments(struct anv_cmd_buffer *cmd_buffer, if (pass->has_stencil_clear_attachment) anv_finishme("stencil clear"); + /* FINISHME: Rethink how we count clear attachments in light of + * 0.138.2 -> 0.170.2 diff. + */ if (pass->num_color_clear_attachments == 0 && !pass->has_depth_clear_attachment) return; @@ -889,8 +892,8 @@ meta_emit_blit(struct anv_cmd_buffer *cmd_buffer, .offset = { dest_offset.x, dest_offset.y }, .extent = { dest_extent.width, dest_extent.height }, }, - .attachmentCount = 1, - .pAttachmentClearValues = NULL, + .clearValueCount = 0, + .pClearValues = NULL, }, VK_RENDER_PASS_CONTENTS_INLINE); VkPipeline pipeline; @@ -1621,8 +1624,8 @@ void anv_CmdClearColorImage( }, .renderPass = pass, .framebuffer = fb, - .attachmentCount = 1, - .pAttachmentClearValues = NULL, + .clearValueCount = 1, + .pClearValues = NULL, }, VK_RENDER_PASS_CONTENTS_INLINE); struct clear_instance_data instance_data = { diff --git a/src/vulkan/gen7_cmd_buffer.c b/src/vulkan/gen7_cmd_buffer.c index 95d1e28698f..323022b13f9 100644 --- a/src/vulkan/gen7_cmd_buffer.c +++ b/src/vulkan/gen7_cmd_buffer.c @@ -641,7 +641,7 @@ begin_render_pass(struct anv_cmd_buffer *cmd_buffer, .DrawingRectangleOriginX = 0); anv_cmd_buffer_clear_attachments(cmd_buffer, pass, - pRenderPassBegin->pAttachmentClearValues); + pRenderPassBegin->pClearValues); } void gen7_CmdBeginRenderPass( diff --git a/src/vulkan/gen8_cmd_buffer.c b/src/vulkan/gen8_cmd_buffer.c index 0e830b4427d..d82a409d886 100644 --- a/src/vulkan/gen8_cmd_buffer.c +++ b/src/vulkan/gen8_cmd_buffer.c @@ -580,7 +580,7 @@ void gen8_CmdBeginRenderPass( .DrawingRectangleOriginX = 0); anv_cmd_buffer_clear_attachments(cmd_buffer, pass, - pRenderPassBegin->pAttachmentClearValues); + pRenderPassBegin->pClearValues); gen8_cmd_buffer_begin_subpass(cmd_buffer, pass->subpasses); } -- 2.30.2