summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-04-24 09:11:34 -0700
committerJason Ekstrand <[email protected]>2018-07-09 10:11:53 -0700
commit55285b8404d04aef0cee5415d7a52697a2729c5b (patch)
tree881000fc45eb2a47a4dffca087b4071d80b95658
parent6c746e8fea1507ee3944bd926bfeef049886bd0c (diff)
anv/pass: Use a designated initailizer for attachments
Reviewed-by: Lionel Landwerlin <[email protected]>
-rw-r--r--src/intel/vulkan/anv_pass.c22
1 files changed, 11 insertions, 11 deletions
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;