Pipeline creation feedback clear per iteration

Considering pipelineStageCreationFeedbackCount = 0 case
memory that hold feedback information have to be memset to 0
every round of test to prevent false readings

Part two of the https://gerrit.khronos.org/c/vk-gl-cts/+/9765

Components: Vulkan

VK-GL-CTS issue: 3736

Affects:

dEQP-VK.pipeline.*.creation_feedback.*

Change-Id: I1dce88369b70dcff78baa9c18285d1a76c9ac71d
diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp
index 6390bf3..942dba3 100644
--- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp
+++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp
@@ -269,6 +269,7 @@
 														 VkPipeline						basePipelineHandle,
 														 VkBool32						zeroOutFeedbackCount);
 	virtual tcu::TestStatus verifyTestResult			(void);
+	void					clearFeedbacks				(void);
 
 protected:
 	const tcu::UVec2					m_renderSize;
@@ -423,9 +424,6 @@
 	const DeviceInterface&	vk				= m_context.getDeviceInterface();
 	const VkDevice			vkDevice		= m_context.getDevice();
 
-	deMemset(m_pipelineCreationFeedback, 0, sizeof(VkPipelineCreationFeedbackEXT) * VK_MAX_PIPELINE_PARTS * PIPELINE_CACHE_NDX_COUNT);
-	deMemset(m_pipelineStageCreationFeedbacks, 0, sizeof(VkPipelineCreationFeedbackEXT) * PIPELINE_CACHE_NDX_COUNT * VK_MAX_SHADER_STAGES);
-
 	// Create pipeline layout
 	{
 		const VkPipelineLayoutCreateInfo pipelineLayoutParams =
@@ -472,6 +470,8 @@
 			m_pipeline[PIPELINE_CACHE_NDX_NO_CACHE].destroyPipeline();
 		}
 
+		clearFeedbacks();
+
 		preparePipelineWrapper(m_pipeline[ndx], vertShaderModule, *tescShaderModule, *teseShaderModule, *geomShaderModule, *fragShaderModule,
 							   &m_pipelineCreationFeedback[VK_MAX_PIPELINE_PARTS * ndx],
 							   &m_pipelineStageCreationFeedbacks[VK_MAX_SHADER_STAGES * ndx],
@@ -683,6 +683,8 @@
 	deUint32		start					= isMonolithic ? finalPipelineIndex : 0u;
 	deUint32		step					= start + 1u;
 
+	clearFeedbacks();
+
 	// Iterate ofer creation feedback for all pipeline parts - if monolithic pipeline is tested then skip (step over) feedback for parts
 	for (deUint32 creationFeedbackNdx = start; creationFeedbackNdx < VK_MAX_PIPELINE_PARTS * PIPELINE_CACHE_NDX_COUNT; creationFeedbackNdx += step)
 	{
@@ -827,6 +829,12 @@
 	return tcu::TestStatus::pass("Pass");
 }
 
+void GraphicsCacheTestInstance::clearFeedbacks(void)
+{
+	deMemset(m_pipelineCreationFeedback, 0, sizeof(VkPipelineCreationFeedbackEXT) * VK_MAX_PIPELINE_PARTS * PIPELINE_CACHE_NDX_COUNT);
+	deMemset(m_pipelineStageCreationFeedbacks, 0, sizeof(VkPipelineCreationFeedbackEXT) * PIPELINE_CACHE_NDX_COUNT * VK_MAX_SHADER_STAGES);
+}
+
 class ComputeCacheTest : public CacheTest
 {
 public: