From fcac02e405661de311b5ceebbd6d3e2c78bf8aea Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 21 Aug 2020 16:04:42 -0400 Subject: Vulkan update/NVAPI support (#1511) * First pass at incorporating nvapi into test harness. * D3d12 Atomic Float Add via NVAPI working * Dx12 atomic float appears to work. * Atomic float add on Dx12. * Added atomic64 feature addition to vk. Fix correct output for atomic-float-byte-address.slang * Disable atomic float failing tests. * Upgraded VK headers. * Detect atomic float availability on VK. * Try to get test working for in64 atomic. * Made HLSL prelude controlled via the render-test requirements. * Added -enable-nvapi to premake. * Fix D3D12Renderer when NVAPI is not available. * Small improvements to VKRenderer. * Improve atomic documentation in target-compatibility.md. --- tools/slang-test/slang-test-main.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'tools/slang-test/slang-test-main.cpp') diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp index 1144b4034..b2e2bb55c 100644 --- a/tools/slang-test/slang-test-main.cpp +++ b/tools/slang-test/slang-test-main.cpp @@ -495,6 +495,7 @@ Result spawnAndWaitSharedLibrary(TestContext* context, const String& testPath, c if (options.shouldBeVerbose) { CommandLine testCmdLine; + testCmdLine.setExecutableFilename("slang-test"); if (options.binDir.getLength()) @@ -531,8 +532,10 @@ Result spawnAndWaitSharedLibrary(TestContext* context, const String& testPath, c stdWriters.setWriter(SLANG_WRITER_CHANNEL_DIAGNOSTIC, &stdError); } + String exePath = Path::combine(context->exeDirectoryPath, exeName); + List args; - args.add(exeName.getBuffer()); + args.add(exePath.getBuffer()); for (Index i = 0; i < cmdLine.m_args.getCount(); ++i) { args.add(cmdLine.m_args[i].value.getBuffer()); @@ -3191,7 +3194,7 @@ SlangResult innerMain(int argc, char** argv) // The context holds useful things used during testing TestContext context; - SLANG_RETURN_ON_FAIL(SLANG_FAILED(context.init())) + SLANG_RETURN_ON_FAIL(SLANG_FAILED(context.init(argv[0]))) auto& categorySet = context.categorySet; @@ -3272,19 +3275,9 @@ SlangResult innerMain(int argc, char** argv) Options& options = context.options; - // Set up the prelude - { - TestToolUtil::PreludeInfo info; - info.exePath = argv[0]; - - if (options.nvapiPath.getLength()) - { - info.nvapiPath = options.nvapiPath.getBuffer(); - } - - TestToolUtil::setSessionDefaultPrelude(info, context.getSession()); - } - + // Set up the prelude/s + TestToolUtil::setSessionDefaultPreludeFromExePath(argv[0], context.getSession()); + if (options.outputMode == TestOutputMode::TeamCity) { // On TeamCity CI there is an issue with unix/linux targets where test system may be different from the build system -- cgit v1.2.3