summaryrefslogtreecommitdiffstats
path: root/source/core/slang-test-tool-util.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-08-21 16:04:42 -0400
committerGitHub <noreply@github.com>2020-08-21 13:04:42 -0700
commitfcac02e405661de311b5ceebbd6d3e2c78bf8aea (patch)
tree6e79865b39f0739d2ac9c3f91cc4129c244b6977 /source/core/slang-test-tool-util.h
parent49067fd2e97b40649df3fa2ce096f78c2e45da5a (diff)
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.
Diffstat (limited to 'source/core/slang-test-tool-util.h')
-rw-r--r--source/core/slang-test-tool-util.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/source/core/slang-test-tool-util.h b/source/core/slang-test-tool-util.h
index 9aa34bd0e..07532682b 100644
--- a/source/core/slang-test-tool-util.h
+++ b/source/core/slang-test-tool-util.h
@@ -36,12 +36,6 @@ enum class ToolReturnCodeSpan
/* Utility functions for 'test tools' */
struct TestToolUtil
{
- struct PreludeInfo
- {
- const char* exePath = nullptr;
- const char* nvapiPath = nullptr;
- };
-
typedef SlangResult(*InnerMainFunc)(Slang::StdWriters* stdWriters, SlangSession* session, int argc, const char*const* argv);
/// If the test failed to run or was ignored then we are done
@@ -53,10 +47,22 @@ struct TestToolUtil
/// Given a slang result, returns a return code that can be returned from an executable
static ToolReturnCode getReturnCode(SlangResult res);
+ /// Given the executable path (as located in Slang directory hierarchy), works out the absolute path to the root
+ static SlangResult getRootPath(const char* exePath, String& outRootPath);
+
+ /// Given the exePath, give return the absolute path to the directory the exe is in
+ static SlangResult getExeDirectoryPath(const char* exePath, String& outExeDirectoryPath);
+
/// Sets the default preludes on the session based on the executable path
- static SlangResult setSessionDefaultPrelude(const PreludeInfo& preludeInfo, slang::IGlobalSession* session);
+ static SlangResult setSessionDefaultPreludeFromRootPath(const String& rootPath, slang::IGlobalSession* session);
- static SlangResult setSessionDefaultPrelude(const char* exePath, slang::IGlobalSession* session);
+ /// Calculates the path that is the combination of parentPath, and relPath
+ /// And converts such that can be used as an include path (handling slashes)
+ static SlangResult getIncludePath(const String& parentPath, const char* relPath, String& outIncludePath);
+
+
+ /// Sets the default preludes on the session based on the executable path
+ static SlangResult setSessionDefaultPreludeFromExePath(const char* exePath, slang::IGlobalSession* session);
};
} // namespace Slang