From: James Fitzpatrick Date: Wed, 3 Nov 2021 14:31:50 +0000 (+0000) Subject: Fix invocation count verification X-Git-Tag: upstream/1.3.5~332^2~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72cf9dc888972c4dc8ed95358f0f56c6a40e072e;p=platform%2Fupstream%2FVK-GL-CTS.git Fix invocation count verification The shaders in these tests track the number of invocations executed and verify that against the expected number of invocations for the test. The spec only guarentees that each fragment is executed at least once. So an implementation is free to execute each fragment multiple times if required (for example, an implementation might required a shader to be run at sample rate). Change this verification to only check against the minmum number of invocations. Affects: dEQP-VK.fragment_operations.early_fragment.samplemask_* Components: Vulkan VK-GL-CTS issue: 3278 Change-Id: I93f1aa42dd6a13486bed044e361671e5a2f2cb07 --- diff --git a/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsEarlyFragmentTests.cpp b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsEarlyFragmentTests.cpp index 5a7e598..f92f1bb 100644 --- a/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsEarlyFragmentTests.cpp +++ b/external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsEarlyFragmentTests.cpp @@ -1519,15 +1519,12 @@ tcu::TestStatus EarlyFragmentSampleMaskTestInstance::iterate (void) const int expectedCounter = expectPartialResult ? renderSize.x() * renderSize.y() / 2 : renderSize.x() * renderSize.y(); const int tolerance = expectPartialResult ? de::max(renderSize.x(), renderSize.y()) * 3 : 0; const int expectedMin = de::max(0, expectedCounter - tolerance); - const int expectedMax = expectedCounter + tolerance; tcu::TestLog& log = m_context.getTestContext().getLog(); - log << tcu::TestLog::Message << "Expected value" - << (expectPartialResult ? " in range: [" + de::toString(expectedMin) + ", " + de::toString(expectedMax) + "]" : ": " + de::toString(expectedCounter)) - << tcu::TestLog::EndMessage; + log << tcu::TestLog::Message << "Minimum expected value: " + de::toString(expectedMin) << tcu::TestLog::EndMessage; log << tcu::TestLog::Message << "Result value: " << de::toString(actualCounter) << tcu::TestLog::EndMessage; - if (expectedMin <= actualCounter && actualCounter <= expectedMax) + if (expectedMin <= actualCounter) return tcu::TestStatus::pass("Success"); else return tcu::TestStatus::fail("Value out of range");