VK_EXT_pipeline_creation_feedback: Add indentation
authorChad Versace <chadversary@google.com>
Thu, 25 Aug 2022 22:19:54 +0000 (15:19 -0700)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Wed, 31 Aug 2022 19:55:39 +0000 (19:55 +0000)
No change in behavior.

Add an indentation level to some code. This prepares for the next
commit, making its diff understandable.

Components: Vulkan

Change-Id: I31e5f706ca6f05b42682a862c740bc4953a91f9b

external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp

index 849f80e..af61b4a 100644 (file)
@@ -863,40 +863,42 @@ tcu::TestStatus GraphicsCacheTestInstance::verifyTestResult (void)
                        return tcu::TestStatus::fail(message.str());
                }
 
-               if (m_param->isCacheDisabled() && m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT)
                {
-                       message << ": feedback indicates pipeline hit cache when it shouldn't";
-                       return tcu::TestStatus::fail(message.str());
-               }
+                       if (m_param->isCacheDisabled() && m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT)
+                       {
+                               message << ": feedback indicates pipeline hit cache when it shouldn't";
+                               return tcu::TestStatus::fail(message.str());
+                       }
 
-               if (ndx == PIPELINE_CACHE_NDX_NO_CACHE && m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT)
-               {
-                       message << ": hit the cache when it shouldn't";
-                       return tcu::TestStatus::fail(message.str());
-               }
+                       if (ndx == PIPELINE_CACHE_NDX_NO_CACHE && m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT)
+                       {
+                               message << ": hit the cache when it shouldn't";
+                               return tcu::TestStatus::fail(message.str());
+                       }
 
-               if (ndx != PIPELINE_CACHE_NDX_DERIVATIVE && m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT)
-               {
-                       message << ": feedback indicates base pipeline acceleration when it shouldn't";
-                       return tcu::TestStatus::fail(message.str());
-               }
+                       if (ndx != PIPELINE_CACHE_NDX_DERIVATIVE && m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT)
+                       {
+                               message << ": feedback indicates base pipeline acceleration when it shouldn't";
+                               return tcu::TestStatus::fail(message.str());
+                       }
 
-               if (ndx == PIPELINE_CACHE_NDX_CACHED && !m_param->isCacheDisabled() && (m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT) == 0)
-               {
-                       message << "\nWarning: Cached pipeline case did not hit the cache";
-                       cachedPipelineWarning = DE_TRUE;
-               }
+                       if (ndx == PIPELINE_CACHE_NDX_CACHED && !m_param->isCacheDisabled() && (m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT) == 0)
+                       {
+                               message << "\nWarning: Cached pipeline case did not hit the cache";
+                               cachedPipelineWarning = DE_TRUE;
+                       }
 
-               if (m_pipelineCreationFeedback[ndx].duration == 0)
-               {
-                       message << "\nWarning: Pipeline creation feedback reports duration spent creating a pipeline was zero nanoseconds\n";
-                       durationZeroWarning = DE_TRUE;
-               }
+                       if (m_pipelineCreationFeedback[ndx].duration == 0)
+                       {
+                               message << "\nWarning: Pipeline creation feedback reports duration spent creating a pipeline was zero nanoseconds\n";
+                               durationZeroWarning = DE_TRUE;
+                       }
 
-               message << "\n";
-               message << "\t\t Hit cache ? \t\t\t"                            << (m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT ? "yes" : "no")        << "\n";
-               message << "\t\t Base Pipeline Acceleration ? \t"       << (m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT ?   "yes" : "no")          << "\n";
-               message << "\t\t Duration (ns): \t\t"                           << m_pipelineCreationFeedback[ndx].duration                                                                                                                                                                                     << "\n";
+                       message << "\n";
+                       message << "\t\t Hit cache ? \t\t\t"                            << (m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT ? "yes" : "no")        << "\n";
+                       message << "\t\t Base Pipeline Acceleration ? \t"       << (m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT ?   "yes" : "no")          << "\n";
+                       message << "\t\t Duration (ns): \t\t"                           << m_pipelineCreationFeedback[ndx].duration                                                                                                                                                                                     << "\n";
+               }
 
                for(deUint32 shader = 0; shader < m_param->getShaderCount(); shader++)
                {
@@ -1196,43 +1198,45 @@ tcu::TestStatus ComputeCacheTestInstance::verifyTestResult (void)
                        return tcu::TestStatus::fail(message.str());
                }
 
-               if (m_param->isCacheDisabled() && m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT)
                {
-                       message << ": feedback indicates pipeline hit cache when it shouldn't";
-                       return tcu::TestStatus::fail(message.str());
-               }
+                       if (m_param->isCacheDisabled() && m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT)
+                       {
+                               message << ": feedback indicates pipeline hit cache when it shouldn't";
+                               return tcu::TestStatus::fail(message.str());
+                       }
 
-               if (ndx == PIPELINE_CACHE_NDX_NO_CACHE && m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT)
-               {
-                       message << ": hit the cache when it shouldn't";
-                       return tcu::TestStatus::fail(message.str());
-               }
+                       if (ndx == PIPELINE_CACHE_NDX_NO_CACHE && m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT)
+                       {
+                               message << ": hit the cache when it shouldn't";
+                               return tcu::TestStatus::fail(message.str());
+                       }
 
-               if (!(ndx == PIPELINE_CACHE_NDX_DERIVATIVE && !m_param->isCacheDisabled()) && m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT)
-               {
-                       message << ": feedback indicates base pipeline acceleration when it shouldn't";
-                       return tcu::TestStatus::fail(message.str());
-               }
+                       if (!(ndx == PIPELINE_CACHE_NDX_DERIVATIVE && !m_param->isCacheDisabled()) && m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT)
+                       {
+                               message << ": feedback indicates base pipeline acceleration when it shouldn't";
+                               return tcu::TestStatus::fail(message.str());
+                       }
 
-               if (ndx == PIPELINE_CACHE_NDX_CACHED && !m_param->isCacheDisabled() && (m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT) == 0)
-               {
-                       message << "\nWarning: Cached pipeline case did not hit the cache";
-                       cachedPipelineWarning = DE_TRUE;
-               }
+                       if (ndx == PIPELINE_CACHE_NDX_CACHED && !m_param->isCacheDisabled() && (m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT) == 0)
+                       {
+                               message << "\nWarning: Cached pipeline case did not hit the cache";
+                               cachedPipelineWarning = DE_TRUE;
+                       }
 
-               if (m_pipelineCreationFeedback[ndx].duration == 0)
-               {
-                       message << "\nWarning: Pipeline creation feedback reports duration spent creating a pipeline was zero nanoseconds\n";
-                       durationZeroWarning = DE_TRUE;
-               }
+                       if (m_pipelineCreationFeedback[ndx].duration == 0)
+                       {
+                               message << "\nWarning: Pipeline creation feedback reports duration spent creating a pipeline was zero nanoseconds\n";
+                               durationZeroWarning = DE_TRUE;
+                       }
 
-               message << "\n";
+                       message << "\n";
 
-               message << "\t\t Hit cache ? \t\t\t"                            << (m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT ? "yes" : "no")        << "\n";
-               message << "\t\t Base Pipeline Acceleration ? \t"       << (m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT ? "yes" : "no")            << "\n";
-               message << "\t\t Duration (ns): \t\t"                           << m_pipelineCreationFeedback[ndx].duration                                                                                                                                                                             << "\n";
+                       message << "\t\t Hit cache ? \t\t\t"                            << (m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT ? "yes" : "no")        << "\n";
+                       message << "\t\t Base Pipeline Acceleration ? \t"       << (m_pipelineCreationFeedback[ndx].flags & VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT ? "yes" : "no")            << "\n";
+                       message << "\t\t Duration (ns): \t\t"                           << m_pipelineCreationFeedback[ndx].duration                                                                                                                                                                             << "\n";
 
-               message << "\t Compute Stage\n";
+                       message << "\t Compute Stage\n";
+               }
 
                // According to the spec:
                //