From: Chad Versace Date: Thu, 20 Aug 2015 16:54:32 +0000 (-0700) Subject: vk: Use temp var in vkCreateRenderPass's attachment loop X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=23872191012a0b95a1ef7bcefeb6609ce595fecf;p=mesa.git vk: Use temp var in vkCreateRenderPass's attachment loop Store the attachment in a temporary variable and s/pass->attachments[i]/att/ . --- diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index 177986183e1..5805ffab193 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -2230,13 +2230,14 @@ VkResult anv_CreateRenderPass( pass->attachments = (void *) pass + attachments_offset; for (uint32_t i = 0; i < pCreateInfo->attachmentCount; i++) { - pass->attachments[i].format = - anv_format_for_vk_format(pCreateInfo->pAttachments[i].format); - pass->attachments[i].samples = pCreateInfo->pAttachments[i].samples; - pass->attachments[i].load_op = pCreateInfo->pAttachments[i].loadOp; - pass->attachments[i].stencil_load_op = pCreateInfo->pAttachments[i].stencilLoadOp; - // pass->attachments[i].store_op = pCreateInfo->pAttachments[i].storeOp; - // pass->attachments[i].stencil_store_op = pCreateInfo->pAttachments[i].stencilStoreOp; + struct anv_render_pass_attachment *att = &pass->attachments[i]; + + att->format = anv_format_for_vk_format(pCreateInfo->pAttachments[i].format); + att->samples = pCreateInfo->pAttachments[i].samples; + att->load_op = pCreateInfo->pAttachments[i].loadOp; + att->stencil_load_op = pCreateInfo->pAttachments[i].stencilLoadOp; + // att->store_op = pCreateInfo->pAttachments[i].storeOp; + // att->stencil_store_op = pCreateInfo->pAttachments[i].stencilStoreOp; } for (uint32_t i = 0; i < pCreateInfo->subpassCount; i++) {