Depth attachment not stored in late_fragment_tests

The stencil was stored, but the depth attachment was set to DONT_CARE.
This allows implementations to optimise out the depth store at the end
of the renderpass, when the test is expecting to readback valid depth
values for reference comparison.

Affects:

dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests*

Components: Vulkan

VK-GL-CTS issue: 1578

Change-Id: Ie3bb52fa63ff379d70759190460ce8662c4c09ad
diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSubpassDependencyTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSubpassDependencyTests.cpp
index 26265dc..1610844 100644
--- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSubpassDependencyTests.cpp
+++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSubpassDependencyTests.cpp
@@ -2095,9 +2095,13 @@
 						const VkFormat				format						(formats[formatNdx]);
 						const VkSampleCountFlagBits	sampleCount					(VK_SAMPLE_COUNT_1_BIT);
 						const VkAttachmentLoadOp	loadOp						(VK_ATTACHMENT_LOAD_OP_CLEAR);
-						const VkAttachmentStoreOp	storeOp						(VK_ATTACHMENT_STORE_OP_DONT_CARE);
+						const VkAttachmentStoreOp	storeOp						((attachmentNdx == attachmentCount - 1)
+																					? VK_ATTACHMENT_STORE_OP_STORE
+																					: VK_ATTACHMENT_STORE_OP_DONT_CARE);
 						const VkAttachmentLoadOp	stencilLoadOp				(VK_ATTACHMENT_LOAD_OP_CLEAR);
-						const VkAttachmentStoreOp	stencilStoreOp				(VK_ATTACHMENT_STORE_OP_STORE);
+						const VkAttachmentStoreOp	stencilStoreOp				((attachmentNdx == attachmentCount - 1)
+																					? VK_ATTACHMENT_STORE_OP_STORE
+																					: VK_ATTACHMENT_STORE_OP_DONT_CARE);
 						const VkImageLayout			initialLayout				(VK_IMAGE_LAYOUT_UNDEFINED);
 						const VkImageLayout			finalLayout					(VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL);