From 40e30331303335c050f52aaafb1eff945740e287 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Thu, 25 Aug 2022 15:19:54 -0700 Subject: [PATCH] VK_EXT_pipeline_creation_feedback: Add indentation 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 --- .../pipeline/vktPipelineCreationFeedbackTests.cpp | 118 +++++++++++---------- 1 file changed, 61 insertions(+), 57 deletions(-) diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp index 849f80e..af61b4a 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp @@ -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: // -- 2.7.4