Merge vk-gl-cts/vulkan-cts-1.2.6 into vk-gl-cts/vulkan-cts-1.2.7

Change-Id: Idcb4f9a2cb008e61fcfcd45aaed0e31be4cf8e1b
diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp
index af61b4a..91855d3 100644
--- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp
+++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp
@@ -857,12 +857,24 @@
 		// VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT is set in pPipelineCreationFeedback."
 		//
 		// Check first that the no cached pipeline was missed in the pipeline cache
+
+		// According to the spec:
+		// "An implementation should write pipeline creation feedback to pPipelineCreationFeedback and
+		//	may write pipeline stage creation feedback to pPipelineStageCreationFeedbacks."
 		if (!(m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT))
 		{
-			message << ": invalid data";
-			return tcu::TestStatus::fail(message.str());
+			// According to the spec:
+			// "If the VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT is not set in flags, an implementation
+			//	must not set any other bits in flags, and all other VkPipelineCreationFeedbackEXT data members are undefined."
+			if (m_pipelineCreationFeedback[ndx].flags)
+			{
+				std::ostringstream			errorMsg;
+				errorMsg << ": Creation feedback is not valid but there are other flags written";
+				return tcu::TestStatus::fail(errorMsg.str());
+			}
+			message << "\t\t Pipeline Creation Feedback data is not valid\n";
 		}
-
+		else
 		{
 			if (m_param->isCacheDisabled() && m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT)
 			{
@@ -905,8 +917,14 @@
 			const deUint32 index = VK_MAX_SHADER_STAGES * ndx + shader;
 			message << "\t" << getShaderFlagStr(m_param->getShaderFlag(shader), true) << "\n";
 
+			// According to the spec:
+			// "An implementation should write pipeline creation feedback to pPipelineCreationFeedback and
+			//	may write pipeline stage creation feedback to pPipelineStageCreationFeedbacks."
 			if (!(m_pipelineStageCreationFeedbacks[index].flags & VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT))
 			{
+				// According to the spec:
+				// "If the VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT is not set in flags, an implementation
+				//	must not set any other bits in flags, and all other VkPipelineCreationFeedbackEXT data members are undefined."
 				if (m_pipelineStageCreationFeedbacks[index].flags)
 				{
 					std::ostringstream			errorMsg;
@@ -1192,12 +1210,24 @@
 		// VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT is set in pPipelineCreationFeedback."
 		//
 		// Check first that the no cached pipeline was missed in the pipeline cache
+
+		// According to the spec:
+		// "An implementation should write pipeline creation feedback to pPipelineCreationFeedback and
+		//	may write pipeline stage creation feedback to pPipelineStageCreationFeedbacks."
 		if (!(m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT))
 		{
-			message << ": invalid data";
-			return tcu::TestStatus::fail(message.str());
+			// According to the spec:
+			// "If the VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT is not set in flags, an implementation
+			//	must not set any other bits in flags, and all other VkPipelineCreationFeedbackEXT data members are undefined."
+			if (m_pipelineCreationFeedback[ndx].flags)
+			{
+				std::ostringstream			errorMsg;
+				errorMsg << ": Creation feedback is not valid but there are other flags written";
+				return tcu::TestStatus::fail(errorMsg.str());
+			}
+			message << "\t\t Pipeline Creation Feedback data is not valid\n";
 		}
-
+		else
 		{
 			if (m_param->isCacheDisabled() && m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT)
 			{
@@ -1239,7 +1269,6 @@
 		}
 
 		// According to the spec:
-		//
 		// "An implementation should write pipeline creation feedback to pPipelineCreationFeedback and
 		//	may write pipeline stage creation feedback to pPipelineStageCreationFeedbacks."
 		if (!(m_pipelineStageCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT))
diff --git a/external/vulkancts/modules/vulkan/robustness/vktRobustnessBufferAccessTests.cpp b/external/vulkancts/modules/vulkan/robustness/vktRobustnessBufferAccessTests.cpp
index 7efbc74..e1ed93b 100644
--- a/external/vulkancts/modules/vulkan/robustness/vktRobustnessBufferAccessTests.cpp
+++ b/external/vulkancts/modules/vulkan/robustness/vktRobustnessBufferAccessTests.cpp
@@ -253,7 +253,7 @@
 
 // RobustBufferAccessTest
 
-const deUint32 RobustBufferAccessTest::s_testArraySize = 1024;
+const deUint32 RobustBufferAccessTest::s_testArraySize = 128; // Fit within minimum required maxUniformBufferRange
 const deUint32 RobustBufferAccessTest::s_numberOfBytesAccessed	= (deUint32)(16 * sizeof(float)); // size of mat4
 
 RobustBufferAccessTest::RobustBufferAccessTest (tcu::TestContext&		testContext,
diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp
index 8e87700..951ea6e 100644
--- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp
+++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp
@@ -4650,8 +4650,9 @@
 								return tcu::TestStatus::fail("Value returned is invalid");
 
 							diff = outputFloats[expectedNdx] - expectedFloats[expectedNdx];
+							deUint32 intDiff = static_cast<deUint32>(diff);
 
-							if ((diff < 0.0f) || (deFloatFloor(diff) != diff))
+							if ((diff < 0.0f) || (expectedFloats[expectedNdx] + static_cast<float>(intDiff)) != outputFloats[expectedNdx])
 								return tcu::TestStatus::fail("Value returned should be equal to expected value plus non-negative integer");
 						}
 						else