Set the correct "unused" attachment initialLayout
authorPiers Daniell <pdaniell@nvidia.com>
Tue, 4 Dec 2018 19:29:19 +0000 (12:29 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Sun, 9 Dec 2018 14:07:43 +0000 (09:07 -0500)
commited2cbfa15b6774e9cca4ab7291b80469ae66ea12
treebaa2d0a81acb021ece05c138041483aa414d6c82
parentb15a2af5542c28246d881ef8dc1c79453ffd83d5
Set the correct "unused" attachment initialLayout

Before the renderpass the "unused" attachment image is cleared
to a known value and left in the VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
layout. However, the initialLayout field for the "unused"
attachment is set to VK_IMAGE_LAYOUT_UNDEFINED, which might
cause the image contents to be perturbed when the image
is transitioned from VK_IMAGE_LAYOUT_UNDEFINED to the
finalLayout of VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL.

I understand that part of the purpose of these
"unused_attachment" tests is to ensure "unused" attachments
aren't modified by the renderpass. However, there is nothing
in the Vulkan spec that says the layout of "unused"
attachments should be ignored. This was discussed in issue:
https://github.com/KhronosGroup/Vulkan-Docs/issues/821

And the conclusion is that the layout must: not be ignored
for "unused" attacments.

Affects:
dEQP-VK.renderpass*.unused_attachment.*

Components: Vulkan

VK-GL-CTS issue: 1129

Change-Id: Ia6db607538cb191bc8ca6e03f8da9c88bac031c4
external/vulkancts/modules/vulkan/renderpass/vktRenderPassUnusedAttachmentTests.cpp