summaryrefslogtreecommitdiff
path: root/tools/slang-test
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-03-28 22:14:33 -0700
committerGitHub <noreply@github.com>2022-03-28 22:14:33 -0700
commit255fd5873f65a6b01d5385c277d55612dc3cc587 (patch)
tree54eda0ae98bc9c1b30ca75e534ca203d8e03f241 /tools/slang-test
parent79b81083b75dc0abdbb8184568dbe36d082e04f3 (diff)
Allow slangc to generate exe from .slang file. (#2170)
Diffstat (limited to 'tools/slang-test')
-rw-r--r--tools/slang-test/slang-test-main.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp
index 05be9e0de..d5f4408ed 100644
--- a/tools/slang-test/slang-test-main.cpp
+++ b/tools/slang-test/slang-test-main.cpp
@@ -759,6 +759,7 @@ static PassThroughFlags _getPassThroughFlagsForTarget(SlangCompileTarget target)
case SLANG_GLSL:
case SLANG_C_SOURCE:
case SLANG_CPP_SOURCE:
+ case SLANG_HOST_CPP_SOURCE:
case SLANG_CUDA_SOURCE:
{
return 0;
@@ -779,9 +780,9 @@ static PassThroughFlags _getPassThroughFlagsForTarget(SlangCompileTarget target)
return PassThroughFlag::Dxc;
}
- case SLANG_HOST_CALLABLE:
- case SLANG_EXECUTABLE:
- case SLANG_SHARED_LIBRARY:
+ case SLANG_SHADER_HOST_CALLABLE:
+ case SLANG_HOST_EXECUTABLE:
+ case SLANG_SHADER_SHARED_LIBRARY:
{
return PassThroughFlag::Generic_C_CPP;
}
@@ -891,7 +892,7 @@ static SlangResult _extractRenderTestRequirements(const CommandLine& cmdLine, Te
passThru = SLANG_PASS_THROUGH_GLSLANG;
break;
case RenderApiType::CPU:
- target = SLANG_HOST_CALLABLE;
+ target = SLANG_SHADER_HOST_CALLABLE;
nativeLanguage = SLANG_SOURCE_LANGUAGE_CPP;
passThru = SLANG_PASS_THROUGH_GENERIC_C_CPP;
break;
@@ -1364,7 +1365,7 @@ TestResult runSimpleTest(TestContext* context, TestInput& input)
}
// If it's executable we run it and use it's output
- if (target == SLANG_EXECUTABLE)
+ if (target == SLANG_HOST_EXECUTABLE)
{
ExecuteResult runExeRes;
if (SLANG_FAILED(_executeBinary(exeRes.standardOutput.getUnownedSlice(), runExeRes)))
@@ -1797,7 +1798,7 @@ static TestResult runCPPCompilerSharedLibrary(TestContext* context, TestInput& i
options.sourceLanguage = (ext == "c") ? SLANG_SOURCE_LANGUAGE_C : SLANG_SOURCE_LANGUAGE_CPP;
// Build a shared library
- options.targetType = SLANG_SHARED_LIBRARY;
+ options.targetType = SLANG_SHADER_SHARED_LIBRARY;
// Compile this source
options.sourceFiles.add(filePath);