diff options
Diffstat (limited to 'tools/slang-test/test-context.cpp')
| -rw-r--r-- | tools/slang-test/test-context.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/slang-test/test-context.cpp b/tools/slang-test/test-context.cpp index 0a0931596..8fa5cb345 100644 --- a/tools/slang-test/test-context.cpp +++ b/tools/slang-test/test-context.cpp @@ -110,3 +110,15 @@ Slang::DownstreamCompiler* TestContext::getDefaultCompiler(SlangSourceLanguage s return set ? set->getDefaultCompiler(sourceLanguage) : nullptr; } +bool TestContext::canRunTestWithRenderApiFlags(Slang::RenderApiFlags requiredFlags) +{ + // If only allow tests that use API - then the requiredFlags must be 0 + if (options.apiOnly && requiredFlags == 0) + { + return false; + } + // Are the required rendering APIs enabled from the -api command line switch + return (requiredFlags & options.enabledApis) == requiredFlags; +} + + |
