Merge vk-gl-cts/vulkan-cts-1.3.0 into vk-gl-cts/vulkan-cts-1.3.1

Change-Id: Icdb7e4a186ce187ce4ced05e9ca56672938c63ee
diff --git a/external/fetch_sources.py b/external/fetch_sources.py
index 61ab51b..6a3b244 100644
--- a/external/fetch_sources.py
+++ b/external/fetch_sources.py
@@ -315,30 +315,30 @@
 		"e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e",
 		"renderdoc"),
 	GitRepo(
-		"https://gitlab.khronos.org/spirv/spirv-tools.git",
-		"git@gitlab.khronos.org:spirv/spirv-tools.git",
-		"f0b6520721c7ab0d4e64c885d9bcbaa21641cbc9",
+		"https://github.com/KhronosGroup/SPIRV-Tools.git",
+		None,
+		"a73e724359a274d7cf4f4248eba5be1e7764fbfd",
 		"spirv-tools"),
 	GitRepo(
-		"https://gitlab.khronos.org/GLSL/glslang.git",
-		"git@gitlab.khronos.org:GLSL/glslang.git",
-		"0d80fdd4d327ee38cabdcc2978b7b61da2359a30",
+		"https://github.com/KhronosGroup/glslang.git",
+		None,
+		"c34bb3b6c55f6ab084124ad964be95a699700d34",
 		"glslang",
 		removeTags = ["master-tot"]),
 	GitRepo(
-		"https://gitlab.khronos.org/spirv/SPIRV-Headers.git",
-		"git@gitlab.khronos.org:spirv/SPIRV-Headers.git",
-		"7445cca32fa418a40dbc8b433734a1d3079200ac",
+		"https://github.com/KhronosGroup/SPIRV-Headers.git",
+		None,
+		"b42ba6d92faf6b4938e6f22ddd186dbdacc98d78",
 		"spirv-headers"),
 	GitRepo(
-		"https://gitlab.khronos.org/vulkan/vulkan.git",
-		"git@gitlab.khronos.org:vulkan/vulkan.git",
-		"35f668085338149643e03b48b1d7aa22c704cf3a",
+		"https://github.com/KhronosGroup/Vulkan-Docs.git",
+		None,
+		"ee155139142a2a71b56238419bf0a6859f7b0a93",
 		"vulkan-docs"),
 	GitRepo(
-		"https://gitlab.khronos.org/spirv/amber.git",
-		"git@gitlab.khronos.org:spirv/amber.git",
-		"58a246b645b1e6ec228f715c9db94cd9f3c0c2be",
+		"https://github.com/google/amber.git",
+		None,
+		"615ab4863f7d2e31d3037d0c6a0f641fd6fc0d07",
 		"amber"),
 ]
 
diff --git a/external/vulkancts/framework/vulkan/vkImageUtil.cpp b/external/vulkancts/framework/vulkan/vkImageUtil.cpp
index b629e8f..79bb92e 100644
--- a/external/vulkancts/framework/vulkan/vkImageUtil.cpp
+++ b/external/vulkancts/framework/vulkan/vkImageUtil.cpp
@@ -4432,6 +4432,7 @@
 					  VkClearColorValue			clearColor,
 					  VkImageLayout				oldLayout,
 					  VkImageLayout				newLayout,
+					  VkAccessFlags				dstAccessFlags,
 					  VkPipelineStageFlags		dstStageFlags,
 					  deUint32					baseArrayLayer,
 					  deUint32					layerCount)
@@ -4467,7 +4468,7 @@
 		VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,		// VkStructureType			sType;
 		DE_NULL,									// const void*				pNext;
 		VK_ACCESS_TRANSFER_WRITE_BIT,				// VkAccessFlags			srcAccessMask;
-		VK_ACCESS_SHADER_WRITE_BIT,					// VkAccessFlags			dstAccessMask;
+		dstAccessFlags,								// VkAccessFlags			dstAccessMask;
 		VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,		// VkImageLayout			oldLayout;
 		newLayout,									// VkImageLayout			newLayout;
 		queueFamilyIndex,							// deUint32					srcQueueFamilyIndex;
@@ -4509,7 +4510,7 @@
 					  deUint32					baseArrayLayer,
 					  deUint32					layerCount)
 {
-	clearColorImage(vk, device, queue, queueFamilyIndex, image, makeClearValueColor(clearColor).color, oldLayout, newLayout, dstStageFlags, baseArrayLayer, layerCount);
+	clearColorImage(vk, device, queue, queueFamilyIndex, image, makeClearValueColor(clearColor).color, oldLayout, newLayout, VK_ACCESS_SHADER_WRITE_BIT, dstStageFlags, baseArrayLayer, layerCount);
 }
 
 std::vector<VkBufferImageCopy> generateChessboardCopyRegions (deUint32				tileSize,
@@ -4788,24 +4789,27 @@
 							 const VkQueue			queue,
 							 deUint32				queueFamilyIndex,
 							 VkImage				image,
+							 VkFormat				format,
 							 float					depthValue,
 							 deUint32				stencilValue,
 							 VkImageLayout			oldLayout,
 							 VkImageLayout			newLayout,
+							 VkAccessFlags			dstAccessFlags,
 							 VkPipelineStageFlags	dstStageFlags)
 {
 	Move<VkCommandPool>				cmdPool				= createCommandPool(vk, device, VK_COMMAND_POOL_CREATE_TRANSIENT_BIT, queueFamilyIndex);
 	Move<VkCommandBuffer>			cmdBuffer			= allocateCommandBuffer(vk, device, *cmdPool, VK_COMMAND_BUFFER_LEVEL_PRIMARY);
 
 	const VkClearDepthStencilValue	clearValue			= makeClearValueDepthStencil(depthValue, stencilValue).depthStencil;
+	const auto						aspectMask			= getImageAspectFlags(mapVkFormat(format));
 
 	const VkImageSubresourceRange	subresourceRange	=
 	{
-		VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT,	// VkImageAspectFlags	aspectMask
-		0u,															// deUint32				baseMipLevel
-		1u,															// deUint32				levelCount
-		0u,															// deUint32				baseArrayLayer
-		1u															// deUint32				layerCount
+		aspectMask,	// VkImageAspectFlags	aspectMask
+		0u,			// deUint32				baseMipLevel
+		1u,			// deUint32				levelCount
+		0u,			// deUint32				baseArrayLayer
+		1u			// deUint32				layerCount
 	};
 
 	const VkImageMemoryBarrier		preImageBarrier		=
@@ -4827,7 +4831,7 @@
 		VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,		// VkStructureType			sType;
 		DE_NULL,									// const void*				pNext;
 		VK_ACCESS_TRANSFER_WRITE_BIT,				// VkAccessFlags			srcAccessMask;
-		VK_ACCESS_SHADER_WRITE_BIT,					// VkAccessFlags			dstAccessMask;
+		dstAccessFlags,								// VkAccessFlags			dstAccessMask;
 		VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,		// VkImageLayout			oldLayout;
 		newLayout,									// VkImageLayout			newLayout;
 		queueFamilyIndex,							// deUint32					srcQueueFamilyIndex;
diff --git a/external/vulkancts/framework/vulkan/vkImageUtil.hpp b/external/vulkancts/framework/vulkan/vkImageUtil.hpp
index b9d7a61..0bb0285 100644
--- a/external/vulkancts/framework/vulkan/vkImageUtil.hpp
+++ b/external/vulkancts/framework/vulkan/vkImageUtil.hpp
@@ -284,6 +284,7 @@
 												 vk::VkClearColorValue							clearColor,
 												 vk::VkImageLayout								oldLayout,
 												 vk::VkImageLayout								newLayout,
+												 vk::VkAccessFlags								dstAccessFlags,
 												 vk::VkPipelineStageFlags						dstStageFlags,
 												 deUint32										baseArrayLayer = 0u,
 												 deUint32										layerCount = 1u);
@@ -329,10 +330,12 @@
 												 const vk::VkQueue								queue,
 												 deUint32										queueFamilyIndex,
 												 vk::VkImage									image,
+												 vk::VkFormat									format,
 												 float											depthValue,
 												 deUint32										stencilValue,
 												 vk::VkImageLayout								oldLayout,
 												 vk::VkImageLayout								newLayout,
+												 vk::VkAccessFlags								dstAccessFlags,
 												 vk::VkPipelineStageFlags						dstStageFlags);
 
 /*--------------------------------------------------------------------*//*!
diff --git a/external/vulkancts/framework/vulkan/vkMandatoryFeatures.inl b/external/vulkancts/framework/vulkan/vkMandatoryFeatures.inl
index a69c0af..9855756 100644
--- a/external/vulkancts/framework/vulkan/vkMandatoryFeatures.inl
+++ b/external/vulkancts/framework/vulkan/vkMandatoryFeatures.inl
@@ -597,6 +597,16 @@
 		nextPtr  = &physicalDeviceVulkan12Features.pNext;
 	}
 
+	vk::VkPhysicalDeviceVulkan13Features physicalDeviceVulkan13Features;
+	deMemset(&physicalDeviceVulkan13Features, 0, sizeof(physicalDeviceVulkan13Features));
+
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		physicalDeviceVulkan13Features.sType = getStructureType<VkPhysicalDeviceVulkan13Features>();
+		*nextPtr = &physicalDeviceVulkan13Features;
+		nextPtr  = &physicalDeviceVulkan13Features.pNext;
+	}
+
 	vk::VkPhysicalDeviceVulkanMemoryModelFeaturesKHR physicalDeviceVulkanMemoryModelFeaturesKHR;
 	deMemset(&physicalDeviceVulkanMemoryModelFeaturesKHR, 0, sizeof(physicalDeviceVulkanMemoryModelFeaturesKHR));
 
@@ -1972,6 +1982,132 @@
 		}
 	}
 
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		if ( physicalDeviceVulkan13Features.robustImageAccess == VK_FALSE )
+		{
+			log << tcu::TestLog::Message << "Mandatory feature robustImageAccess not supported" << tcu::TestLog::EndMessage;
+			result = false;
+		}
+	}
+
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		if ( physicalDeviceVulkan13Features.inlineUniformBlock == VK_FALSE )
+		{
+			log << tcu::TestLog::Message << "Mandatory feature inlineUniformBlock not supported" << tcu::TestLog::EndMessage;
+			result = false;
+		}
+	}
+
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		if ( physicalDeviceVulkan13Features.descriptorBindingInlineUniformBlockUpdateAfterBind == VK_FALSE )
+		{
+			log << tcu::TestLog::Message << "Mandatory feature descriptorBindingInlineUniformBlockUpdateAfterBind not supported" << tcu::TestLog::EndMessage;
+			result = false;
+		}
+	}
+
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		if ( physicalDeviceVulkan13Features.pipelineCreationCacheControl == VK_FALSE )
+		{
+			log << tcu::TestLog::Message << "Mandatory feature pipelineCreationCacheControl not supported" << tcu::TestLog::EndMessage;
+			result = false;
+		}
+	}
+
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		if ( physicalDeviceVulkan13Features.privateData == VK_FALSE )
+		{
+			log << tcu::TestLog::Message << "Mandatory feature privateData not supported" << tcu::TestLog::EndMessage;
+			result = false;
+		}
+	}
+
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		if ( physicalDeviceVulkan13Features.shaderDemoteToHelperInvocation == VK_FALSE )
+		{
+			log << tcu::TestLog::Message << "Mandatory feature shaderDemoteToHelperInvocation not supported" << tcu::TestLog::EndMessage;
+			result = false;
+		}
+	}
+
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		if ( physicalDeviceVulkan13Features.shaderTerminateInvocation == VK_FALSE )
+		{
+			log << tcu::TestLog::Message << "Mandatory feature shaderTerminateInvocation not supported" << tcu::TestLog::EndMessage;
+			result = false;
+		}
+	}
+
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		if ( physicalDeviceVulkan13Features.subgroupSizeControl == VK_FALSE )
+		{
+			log << tcu::TestLog::Message << "Mandatory feature subgroupSizeControl not supported" << tcu::TestLog::EndMessage;
+			result = false;
+		}
+	}
+
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		if ( physicalDeviceVulkan13Features.computeFullSubgroups == VK_FALSE )
+		{
+			log << tcu::TestLog::Message << "Mandatory feature computeFullSubgroups not supported" << tcu::TestLog::EndMessage;
+			result = false;
+		}
+	}
+
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		if ( physicalDeviceVulkan13Features.synchronization2 == VK_FALSE )
+		{
+			log << tcu::TestLog::Message << "Mandatory feature synchronization2 not supported" << tcu::TestLog::EndMessage;
+			result = false;
+		}
+	}
+
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		if ( physicalDeviceVulkan13Features.shaderZeroInitializeWorkgroupMemory == VK_FALSE )
+		{
+			log << tcu::TestLog::Message << "Mandatory feature shaderZeroInitializeWorkgroupMemory not supported" << tcu::TestLog::EndMessage;
+			result = false;
+		}
+	}
+
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		if ( physicalDeviceVulkan13Features.dynamicRendering == VK_FALSE )
+		{
+			log << tcu::TestLog::Message << "Mandatory feature dynamicRendering not supported" << tcu::TestLog::EndMessage;
+			result = false;
+		}
+	}
+
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		if ( physicalDeviceVulkan13Features.shaderIntegerDotProduct == VK_FALSE )
+		{
+			log << tcu::TestLog::Message << "Mandatory feature shaderIntegerDotProduct not supported" << tcu::TestLog::EndMessage;
+			result = false;
+		}
+	}
+
+	if ( context.contextSupports(vk::ApiVersion(1, 3, 0)) )
+	{
+		if ( physicalDeviceVulkan13Features.maintenance4 == VK_FALSE )
+		{
+			log << tcu::TestLog::Message << "Mandatory feature maintenance4 not supported" << tcu::TestLog::EndMessage;
+			result = false;
+		}
+	}
+
 	return result;
 }
 
diff --git a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
index 1e499c0..6530a14 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
@@ -5747,37 +5747,35 @@
 	if (!context.contextSupports(vk::ApiVersion(1, 3, 0)))
 		TCU_THROW(NotSupportedError, "At least Vulkan 1.3 required to run test");
 
-	VkPhysicalDeviceVulkan13Features	vulkan13Features	= initVulkanStructure();
-	VkPhysicalDeviceFeatures2			extFeatures			= initVulkanStructure(&vulkan13Features);
+	VkPhysicalDeviceVulkan13Features					vulkan13Features				= initVulkanStructure();
+	VkPhysicalDeviceFeatures2							extFeatures						= initVulkanStructure(&vulkan13Features);
 
 	vki.getPhysicalDeviceFeatures2(physicalDevice, &extFeatures);
 
 	log << TestLog::Message << vulkan13Features << TestLog::EndMessage;
 
-	// Validate if required VkPhysicalDeviceVulkan13Features fields are set and that corresponding extensions are present
-	std::pair<std::pair<const char*,const char*>, VkBool32> extensions2validate[] =
+	// Validate if required VkPhysicalDeviceVulkan13Features fields are set
+	std::pair<const char*, VkBool32> features2validate[]
 	{
-		{ { "VK_EXT_image_robustness",						"VkPhysicalDeviceVulkan13Features.robustImageAccess" },						vulkan13Features.robustImageAccess },
-		{ { "VK_EXT_inline_uniform_block",					"VkPhysicalDeviceVulkan13Features.inlineUniformBlock" },					vulkan13Features.inlineUniformBlock },
-		{ { "VK_EXT_pipeline_creation_cache_control",		"VkPhysicalDeviceVulkan13Features.pipelineCreationCacheControl" },			vulkan13Features.pipelineCreationCacheControl },
-		{ { "VK_EXT_private_data",							"VkPhysicalDeviceVulkan13Features.privateData" },							vulkan13Features.privateData },
-		{ { "VK_EXT_shader_demote_to_helper_invocation",	"VkPhysicalDeviceVulkan13Features.shaderDemoteToHelperInvocation" },		vulkan13Features.shaderDemoteToHelperInvocation },
-		{ { "VK_KHR_shader_terminate_invocation",			"VkPhysicalDeviceVulkan13Features.shaderTerminateInvocation" },				vulkan13Features.shaderTerminateInvocation },
-		{ { "VK_EXT_subgroup_size_control",					"VkPhysicalDeviceVulkan13Features.subgroupSizeControl" },					vulkan13Features.subgroupSizeControl },
-		{ { "VK_EXT_subgroup_size_control",					"VkPhysicalDeviceVulkan13Features.computeFullSubgroups" },					vulkan13Features.computeFullSubgroups },
-		{ { "VK_KHR_synchronization2",						"VkPhysicalDeviceVulkan13Features.synchronization2" },						vulkan13Features.synchronization2 },
-		{ { "VK_KHR_zero_initialize_workgroup_memory",		"VkPhysicalDeviceVulkan13Features.shaderZeroInitializeWorkgroupMemory" },	vulkan13Features.shaderZeroInitializeWorkgroupMemory },
-		{ { "VK_KHR_dynamic_rendering",						"VkPhysicalDeviceVulkan13Features.dynamicRendering" },						vulkan13Features.dynamicRendering },
-		{ { "VK_KHR_shader_integer_dot_product",			"VkPhysicalDeviceVulkan13Features.shaderIntegerDotProduct" },				vulkan13Features.shaderIntegerDotProduct },
-		{ { "VK_KHR_maintenance4",							"VkPhysicalDeviceVulkan13Features.maintenance4" },							vulkan13Features.maintenance4 },
+		{ { "VkPhysicalDeviceVulkan13Features.robustImageAccess" },										vulkan13Features.robustImageAccess },
+		{ { "VkPhysicalDeviceVulkan13Features.inlineUniformBlock" },									vulkan13Features.inlineUniformBlock },
+		{ { "VkPhysicalDeviceVulkan13Features.descriptorBindingInlineUniformBlockUpdateAfterBind" },	vulkan13Features.descriptorBindingInlineUniformBlockUpdateAfterBind },
+		{ { "VkPhysicalDeviceVulkan13Features.pipelineCreationCacheControl" },							vulkan13Features.pipelineCreationCacheControl },
+		{ { "VkPhysicalDeviceVulkan13Features.privateData" },											vulkan13Features.privateData },
+		{ { "VkPhysicalDeviceVulkan13Features.shaderDemoteToHelperInvocation" },						vulkan13Features.shaderDemoteToHelperInvocation },
+		{ { "VkPhysicalDeviceVulkan13Features.shaderTerminateInvocation" },								vulkan13Features.shaderTerminateInvocation },
+		{ { "VkPhysicalDeviceVulkan13Features.subgroupSizeControl" },									vulkan13Features.subgroupSizeControl },
+		{ { "VkPhysicalDeviceVulkan13Features.computeFullSubgroups" },									vulkan13Features.computeFullSubgroups },
+		{ { "VkPhysicalDeviceVulkan13Features.synchronization2" },										vulkan13Features.synchronization2 },
+		{ { "VkPhysicalDeviceVulkan13Features.shaderZeroInitializeWorkgroupMemory" },					vulkan13Features.shaderZeroInitializeWorkgroupMemory },
+		{ { "VkPhysicalDeviceVulkan13Features.dynamicRendering" },										vulkan13Features.dynamicRendering },
+		{ { "VkPhysicalDeviceVulkan13Features.shaderIntegerDotProduct" },								vulkan13Features.shaderIntegerDotProduct },
+		{ { "VkPhysicalDeviceVulkan13Features.maintenance4" },											vulkan13Features.maintenance4 },
 	};
-	vector<VkExtensionProperties> extensionProperties = enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
-	for (const auto& ext : extensions2validate)
+	for (const auto& feature : features2validate)
 	{
-		if (!checkExtension(extensionProperties, ext.first.first))
-			TCU_FAIL(string("Mising extension ") + ext.first.first);
-		if (!ext.second)
-			TCU_FAIL(string("Required feature ") + ext.first.second + " is not set");
+		if (!feature.second)
+			TCU_FAIL(string("Required feature ") + feature.first + " is not set");
 	}
 
 	// collect all extension features
diff --git a/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp
index e3d1c8a..b97ba82 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp
@@ -240,7 +240,7 @@
 int calcFloatDiff (float a, float b)
 {
 	const int			asign	= Float32(a).sign();
-	const int			bsign	= Float32(a).sign();
+	const int			bsign	= Float32(b).sign();
 
 	const deUint32		avalue	= (Float32(a).bits() & ((0x1u << 31u) - 1u));
 	const deUint32		bvalue	= (Float32(b).bits() & ((0x1u << 31u) - 1u));
diff --git a/external/vulkancts/modules/vulkan/image/vktImageLoadStoreTests.cpp b/external/vulkancts/modules/vulkan/image/vktImageLoadStoreTests.cpp
index 7032d68..fadbfed 100644
--- a/external/vulkancts/modules/vulkan/image/vktImageLoadStoreTests.cpp
+++ b/external/vulkancts/modules/vulkan/image/vktImageLoadStoreTests.cpp
@@ -2863,7 +2863,7 @@
 	{
 		const std::string	caseName	= getFormatShortString(format);
 		const auto			readFormat	= format;
-		const auto			writeFormat	= getShaderExtensionOperandFormat(false, is64BitIntegerFormat(format));
+		const auto			writeFormat	= getShaderExtensionOperandFormat(isIntFormat(format), is64BitIntegerFormat(format));
 
 		if (!hasSpirvFormat(readFormat) || !hasSpirvFormat(writeFormat))
 			continue;
diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassLoadStoreOpNoneTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassLoadStoreOpNoneTests.cpp
index b8f1286..5a00417 100644
--- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassLoadStoreOpNoneTests.cpp
+++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassLoadStoreOpNoneTests.cpp
@@ -37,6 +37,7 @@
 #include "tcuImageCompare.hpp"
 #include "tcuPlatform.hpp"
 #include "tcuTestLog.hpp"
+#include "tcuTextureUtil.hpp"
 #include "deStringUtil.hpp"
 #include "deUniquePtr.hpp"
 #include "deRandom.hpp"
@@ -190,7 +191,6 @@
 									 const TestParams		testParams)
 {
 	const VkImageAspectFlags	aspectMask						= testParams.renderingType == RENDERING_TYPE_RENDERPASS_LEGACY ? 0 : VK_IMAGE_ASPECT_COLOR_BIT;
-	const VkImageAspectFlags	depthStencilAspectMask			= testParams.renderingType == RENDERING_TYPE_RENDERPASS_LEGACY ? 0 : VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
 	std::vector<AttachmentDesc>	attachmentDescriptions;
 	std::vector<SubpassDesc>	subpassDescriptions;
 
@@ -277,6 +277,7 @@
 			else if (ref.usage & ATTACHMENT_USAGE_DEPTH_STENCIL)
 			{
 				layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
+				const auto depthStencilAspectMask = testParams.renderingType == RENDERING_TYPE_RENDERPASS_LEGACY ? 0 : getImageAspectFlags(mapVkFormat(testParams.depthStencilFormat));
 				refs.depthStencilAttachmentRefs.push_back({DE_NULL, ref.idx, layout, depthStencilAspectMask});
 			}
 			else
@@ -415,6 +416,41 @@
 		ctx.requireDeviceFunctionality("VK_KHR_dynamic_rendering");
 
 	ctx.requireDeviceFunctionality("VK_EXT_load_store_op_none");
+
+	// Check depth/stencil format support.
+	for (const auto& att : m_testParams.attachments)
+	{
+		if (att.usage & ATTACHMENT_USAGE_DEPTH_STENCIL)
+		{
+			const VkFormat		format		= getFormat(att.usage, m_testParams.depthStencilFormat);
+			VkImageUsageFlags	usage		= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
+			const auto			aspectFlags	= getImageAspectFlags(mapVkFormat(format));
+
+			if (att.usage & ATTACHMENT_USAGE_DEPTH)
+				DE_ASSERT((aspectFlags & VK_IMAGE_ASPECT_DEPTH_BIT) != 0u);
+
+			if (att.usage & ATTACHMENT_USAGE_STENCIL)
+				DE_ASSERT((aspectFlags & VK_IMAGE_ASPECT_STENCIL_BIT) != 0u);
+
+			DE_UNREF(aspectFlags); // For release builds.
+
+			if (att.verifyInner || att.verifyOuter)
+				usage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
+
+			if (att.init & ATTACHMENT_INIT_PRE)
+				usage |= VK_IMAGE_USAGE_TRANSFER_DST_BIT;
+
+			const auto&				vki			= ctx.getInstanceInterface();
+			const auto				physDev		= ctx.getPhysicalDevice();
+			const auto				imgType		= VK_IMAGE_TYPE_2D;
+			const auto				tiling		= VK_IMAGE_TILING_OPTIMAL;
+			VkImageFormatProperties	properties;
+			const auto				result		= vki.getPhysicalDeviceImageFormatProperties(physDev, format, imgType, tiling, usage, 0u, &properties);
+
+			if (result != VK_SUCCESS)
+				TCU_THROW(NotSupportedError, "Depth-stencil format not supported");
+		}
+	}
 }
 
 void LoadStoreOpNoneTest::initPrograms (SourceCollections& sourceCollections) const
@@ -466,7 +502,7 @@
 		"#version 450\n"
 		"layout(location = 0) in highp vec4 vtxColor;\n"
 		"layout(location = 0) out highp vec4 fragColor;\n"
-		"layout(input_attachment_index = 0, set = 0, binding = 0) uniform subpassInput inputColor;"
+		"layout(input_attachment_index = 0, set = 0, binding = 0) uniform subpassInput inputColor;\n"
 		"void main (void)\n"
 		"{\n"
 		"	fragColor = subpassLoad(inputColor) + vtxColor;\n"
@@ -610,7 +646,7 @@
 		{
 			if (att.usage & ATTACHMENT_USAGE_DEPTH_STENCIL)
 			{
-				clearAttachments.push_back({VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT, 0u,
+				clearAttachments.push_back({getImageAspectFlags(mapVkFormat(m_testParams.depthStencilFormat)), 0u,
 											makeClearValueDepthStencil(0.25, 64)});
 			}
 			else
@@ -687,16 +723,8 @@
 
 		if (att.usage & ATTACHMENT_USAGE_DEPTH_STENCIL)
 		{
-			aspectFlags = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
+			aspectFlags = getImageAspectFlags(mapVkFormat(format));
 			usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
-
-			VkImageFormatProperties		properties;
-			VkResult result = m_context.getInstanceInterface().getPhysicalDeviceImageFormatProperties(
-				m_context.getPhysicalDevice(), format, VK_IMAGE_TYPE_2D, VK_IMAGE_TILING_OPTIMAL, usage, 0u, &properties);
-			if (result != VK_SUCCESS)
-			{
-				TCU_THROW(NotSupportedError, "Depth-stencil format not supported");
-			}
 		}
 		else
 		{
@@ -760,16 +788,22 @@
 
 			if (firstUsage & ATTACHMENT_USAGE_DEPTH_STENCIL)
 			{
-				clearDepthStencilImage(vk, vkDevice, queue, queueFamilyIndex, *attachmentImages.back(), 0.5f, 128u,
+				const auto dstAccess	= (VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT);
+				const auto dstStage		= (VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT);
+
+				clearDepthStencilImage(vk, vkDevice, queue, queueFamilyIndex, *attachmentImages.back(), format, 0.5f, 128u,
 									   VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
-									   VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
+									   dstAccess, dstStage);
 			}
 			else
 			{
-				VkClearColorValue clearColor = att.usage & ATTACHMENT_USAGE_INTEGER ? makeClearValueColorU32(0u, 255u, 0u, 255u).color : makeClearValueColorF32(0.0f, 1.0f, 0.0f, 1.0f).color;
+				const auto dstAccess	= (VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT);
+				const auto dstStage		= (VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
+				const auto clearColor	= ((att.usage & ATTACHMENT_USAGE_INTEGER) ? makeClearValueColorU32(0u, 255u, 0u, 255u).color : makeClearValueColorF32(0.0f, 1.0f, 0.0f, 1.0f).color);
+				const auto layout		= ((firstUsage & ATTACHMENT_USAGE_COLOR) ? VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
+
 				clearColorImage(vk, vkDevice, queue, queueFamilyIndex, *attachmentImages.back(), clearColor, VK_IMAGE_LAYOUT_UNDEFINED,
-								firstUsage & ATTACHMENT_USAGE_COLOR ? VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
-								VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
+								layout, dstAccess, dstStage);
 			}
 		}
 	}
@@ -1093,10 +1127,13 @@
 
 				if (att.usage & ATTACHMENT_USAGE_DEPTH_STENCIL)
 				{
-					renderingCreateInfo.depthAttachmentFormat	= format;
-					renderingCreateInfo.stencilAttachmentFormat	= format;
+					const auto tcuFormat	= mapVkFormat(format);
+					const auto hasDepth		= tcu::hasDepthComponent(tcuFormat.order);
+					const auto hasStencil	= tcu::hasStencilComponent(tcuFormat.order);
+					renderingCreateInfo.depthAttachmentFormat	= (hasDepth   ? format : VK_FORMAT_UNDEFINED);
+					renderingCreateInfo.stencilAttachmentFormat	= (hasStencil ? format : VK_FORMAT_UNDEFINED);
 				}
-				else
+				else if (!(att.usage & ATTACHMENT_USAGE_RESOLVE_TARGET))
 				{
 					colorVector.push_back(format);
 				}
@@ -1196,7 +1233,8 @@
 			}
 			else
 			{
-				textureLevelResult = pipeline::readColorAttachment(vk, vkDevice, queue, queueFamilyIndex, allocator, *attachmentImages[i], format, m_imageSize, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL);
+				VkImageLayout layout = ((m_testParams.renderingType == RENDERING_TYPE_DYNAMIC_RENDERING) ? VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL);
+				textureLevelResult = pipeline::readColorAttachment(vk, vkDevice, queue, queueFamilyIndex, allocator, *attachmentImages[i], format, m_imageSize, layout);
 			}
 
 			const tcu::ConstPixelBufferAccess&	access				= textureLevelResult->getAccess();
diff --git a/external/vulkancts/scripts/src/mandatory_features.txt b/external/vulkancts/scripts/src/mandatory_features.txt
index c89bced..456ceb9 100644
--- a/external/vulkancts/scripts/src/mandatory_features.txt
+++ b/external/vulkancts/scripts/src/mandatory_features.txt
@@ -153,3 +153,17 @@
 VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR			FEATURES ( shaderIntegerDotProduct )							REQUIREMENTS ( VK_KHR_shader_integer_dot_product )
 VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT		FEATURES ( primitiveTopologyListRestart )						REQUIREMENTS ( VK_EXT_primitive_topology_list_restart )
 VkPhysicalDeviceBorderColorSwizzleFeaturesEXT				FEATURES ( borderColorSwizzle )									REQUIREMENTS ( VK_EXT_border_color_swizzle )
+VkPhysicalDeviceVulkan13Features							FEATURES ( robustImageAccess )									REQUIREMENTS ( "ApiVersion(1, 3, 0)" )
+VkPhysicalDeviceVulkan13Features							FEATURES ( inlineUniformBlock )									REQUIREMENTS ( "ApiVersion(1, 3, 0)" )
+VkPhysicalDeviceVulkan13Features							FEATURES ( descriptorBindingInlineUniformBlockUpdateAfterBind )	REQUIREMENTS ( "ApiVersion(1, 3, 0)" )
+VkPhysicalDeviceVulkan13Features							FEATURES ( pipelineCreationCacheControl )						REQUIREMENTS ( "ApiVersion(1, 3, 0)" )
+VkPhysicalDeviceVulkan13Features							FEATURES ( privateData )										REQUIREMENTS ( "ApiVersion(1, 3, 0)" )
+VkPhysicalDeviceVulkan13Features							FEATURES ( shaderDemoteToHelperInvocation )						REQUIREMENTS ( "ApiVersion(1, 3, 0)" )
+VkPhysicalDeviceVulkan13Features							FEATURES ( shaderTerminateInvocation )							REQUIREMENTS ( "ApiVersion(1, 3, 0)" )
+VkPhysicalDeviceVulkan13Features							FEATURES ( subgroupSizeControl )								REQUIREMENTS ( "ApiVersion(1, 3, 0)" )
+VkPhysicalDeviceVulkan13Features							FEATURES ( computeFullSubgroups )								REQUIREMENTS ( "ApiVersion(1, 3, 0)" )
+VkPhysicalDeviceVulkan13Features							FEATURES ( synchronization2 )									REQUIREMENTS ( "ApiVersion(1, 3, 0)" )
+VkPhysicalDeviceVulkan13Features							FEATURES ( shaderZeroInitializeWorkgroupMemory )				REQUIREMENTS ( "ApiVersion(1, 3, 0)" )
+VkPhysicalDeviceVulkan13Features							FEATURES ( dynamicRendering )									REQUIREMENTS ( "ApiVersion(1, 3, 0)" )
+VkPhysicalDeviceVulkan13Features							FEATURES ( shaderIntegerDotProduct )							REQUIREMENTS ( "ApiVersion(1, 3, 0)" )
+VkPhysicalDeviceVulkan13Features							FEATURES ( maintenance4 )										REQUIREMENTS ( "ApiVersion(1, 3, 0)" )