}
}
- // when checkSupport is called script is not yet parsed so we need to determine
- // unsupported tests by name ; in AmberTestCase we do not have access to actual
- // m_recipe implementation - we can't scan it to see if test can be executed;
- // alternatively portability extension and its features could be checked in amber.cc
- if (ctx.isDeviceFunctionalitySupported("VK_KHR_portability_subset"))
- {
- if (m_name == "triangle_fan" && !ctx.getPortabilitySubsetFeatures().triangleFans)
- TCU_THROW(NotSupportedError, "VK_KHR_portability_subset: Triangle fans are not supported by this implementation");
-
- if (ctx.getPortabilitySubsetProperties().minVertexInputBindingStrideAlignment == 4)
- {
- const std::set<std::string> casesToSkip
- {
- "line-strip",
- "polygon-mode-lines",
- "r8g8-uint-highp",
- "r8g8-uint-highp-output-uint",
- "r8g8-uint-mediump",
- "r8g8-uint-mediump-output-uint",
- "inputs-outputs-mod",
- };
-
- if (casesToSkip.count(m_name))
- TCU_THROW(NotSupportedError, "VK_KHR_portability_subset: Stride is not multiply of minVertexInputBindingStrideAlignment");
- }
- }
-
if (m_checkSupportCallback)
(m_checkSupportCallback)(ctx, m_name);
}
namespace
{
+void checkSupport (Context& context, std::string testName)
+{
+ if (context.isDeviceFunctionalitySupported("VK_KHR_portability_subset")
+ && context.getPortabilitySubsetProperties().minVertexInputBindingStrideAlignment == 4
+ && (testName.find("r8g8") != std::string::npos || testName.find("inputs-outputs-mod") != std::string::npos))
+ {
+ TCU_THROW(NotSupportedError, "VK_KHR_portability_subset: Stride is not a multiple of minVertexInputBindingStrideAlignment");
+ }
+}
+
void createTests (tcu::TestCaseGroup* testGroup)
{
tcu::TestContext& testCtx = testGroup->getTestContext();
const std::string fileName = cases[i] + ".amber";
cts_amber::AmberTestCase* testCase = cts_amber::createAmberTestCase(testCtx, cases[i].c_str(), "", dataDir, fileName);
+ testCase->setCheckSupportCallback(checkSupport);
array->addChild(testCase);
}
}