summaryrefslogtreecommitdiff
path: root/tools/slang-test/options.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-03-25 11:48:10 -0400
committerGitHub <noreply@github.com>2019-03-25 11:48:10 -0400
commit2f4029a753f72833c30c4e6bad28c06b20540384 (patch)
treeca771b5e00c6126351079b2df920d014e4ed6a1e /tools/slang-test/options.cpp
parent5bdc3ef07373be62363deb64dedd4163589430b6 (diff)
Adapter selection for Renderer (#923)
* * Make adapter used selectable on the command line * Added 'adapter' to Renderer::Desc with dx11, dx12, vk honoring it * GL will check that the renderer matches, but cannot select a specific device * Share functionality on dx adapter selection in D3DUtil Note - that on tests that use OpenGL and the adapter doesn't match it will ignore the test (and display a message that the appropriate device couldn't be started) * Small function name improvement. * Variable rename to match type. * Fix typo in Dx12 device selection. * * Add checking if an adapter is warp * Improve some comments
Diffstat (limited to 'tools/slang-test/options.cpp')
-rw-r--r--tools/slang-test/options.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/slang-test/options.cpp b/tools/slang-test/options.cpp
index 70b7a4533..2b9ec6c06 100644
--- a/tools/slang-test/options.cpp
+++ b/tools/slang-test/options.cpp
@@ -170,6 +170,15 @@ static bool _isSubCommand(const char* arg)
argCursor++;
// Assumed to be handle by .bat file that called us
}
+ else if (strcmp(arg, "-adapter") == 0)
+ {
+ if (argCursor == argEnd)
+ {
+ stdError.print("error: expected operand for '%s'\n", arg);
+ return SLANG_FAIL;
+ }
+ optionsOut->adapter = *argCursor++;
+ }
else if (strcmp(arg, "-appveyor") == 0)
{
optionsOut->outputMode = TestOutputMode::AppVeyor;