diff options
Diffstat (limited to 'tools/render-test')
| -rw-r--r-- | tools/render-test/options.cpp | 4 | ||||
| -rw-r--r-- | tools/render-test/options.h | 2 | ||||
| -rw-r--r-- | tools/render-test/render-test-main.cpp | 8 |
3 files changed, 14 insertions, 0 deletions
diff --git a/tools/render-test/options.cpp b/tools/render-test/options.cpp index 11b291c68..e0b38bf31 100644 --- a/tools/render-test/options.cpp +++ b/tools/render-test/options.cpp @@ -257,6 +257,10 @@ static rhi::DeviceType _toRenderType(Slang::RenderApiType apiType) { outOptions.dx12Experimental = true; } + else if (argValue == "-show-adapter-info") + { + outOptions.showAdapterInfo = true; + } else { // Lookup diff --git a/tools/render-test/options.h b/tools/render-test/options.h index c95edee21..f041c3e84 100644 --- a/tools/render-test/options.h +++ b/tools/render-test/options.h @@ -91,6 +91,8 @@ struct Options bool dx12Experimental = false; + bool showAdapterInfo = false; + Options() { downstreamArgs.addName("slang"); } static SlangResult parse( diff --git a/tools/render-test/render-test-main.cpp b/tools/render-test/render-test-main.cpp index b0d6c44e0..d3d4a764c 100644 --- a/tools/render-test/render-test-main.cpp +++ b/tools/render-test/render-test-main.cpp @@ -1450,6 +1450,14 @@ static SlangResult _innerMain( } } + // Print adapter info after device creation but before any other operations + if (options.showAdapterInfo) + { + auto info = device->getDeviceInfo(); + auto out = stdWriters->getOut(); + out.print("Using graphics adapter: %s\n", info.adapterName); + } + // If the only test is we can startup, then we are done if (options.onlyStartup) { |
