From: Jason Ekstrand Date: Tue, 24 Apr 2018 16:11:34 +0000 (-0700) Subject: anv/pass: Use a designated initailizer for attachments X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=55285b8404d04aef0cee5415d7a52697a2729c5b;p=mesa.git anv/pass: Use a designated initailizer for attachments Reviewed-by: Lionel Landwerlin --- diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c index 994a7e274f4..38460cb2fe3 100644 --- a/src/intel/vulkan/anv_pass.c +++ b/src/intel/vulkan/anv_pass.c @@ -87,17 +87,17 @@ VkResult anv_CreateRenderPass( pass->subpass_flushes = subpass_flushes; for (uint32_t i = 0; i < pCreateInfo->attachmentCount; i++) { - struct anv_render_pass_attachment *att = &pass->attachments[i]; - - att->format = pCreateInfo->pAttachments[i].format; - att->samples = pCreateInfo->pAttachments[i].samples; - att->usage = 0; - att->load_op = pCreateInfo->pAttachments[i].loadOp; - att->store_op = pCreateInfo->pAttachments[i].storeOp; - att->stencil_load_op = pCreateInfo->pAttachments[i].stencilLoadOp; - att->initial_layout = pCreateInfo->pAttachments[i].initialLayout; - att->final_layout = pCreateInfo->pAttachments[i].finalLayout; - att->first_subpass_layout = VK_IMAGE_LAYOUT_UNDEFINED; + pass->attachments[i] = (struct anv_render_pass_attachment) { + .format = pCreateInfo->pAttachments[i].format, + .samples = pCreateInfo->pAttachments[i].samples, + .usage = 0, + .load_op = pCreateInfo->pAttachments[i].loadOp, + .store_op = pCreateInfo->pAttachments[i].storeOp, + .stencil_load_op = pCreateInfo->pAttachments[i].stencilLoadOp, + .initial_layout = pCreateInfo->pAttachments[i].initialLayout, + .final_layout = pCreateInfo->pAttachments[i].finalLayout, + .first_subpass_layout = VK_IMAGE_LAYOUT_UNDEFINED, + }; } bool has_color = false, has_depth = false, has_input = false;