summaryrefslogtreecommitdiff
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2018-11-21 13:41:34 -0500
committerGitHub <noreply@github.com>2018-11-21 13:41:34 -0500
commite21d5ad650130631e17662ce8f22d15315ab597a (patch)
treea1f5053efebc6184d21b0151e38ba1a52e74b07c /source/slang/slang.cpp
parent9bb11b69a08c66e2857f439837e2253658aed9a4 (diff)
Feature/early depth stencil (#727)
* First pass support for early depth stencil. * Add a simple test to check if output has attributes. * Use cross compilation to test [earlydepthstencil] on glsl. * If target is dxil, use dxc to test against. Add hlsl to test earlydepthstencil against. * * Added spSessionHasCompileTargetSupport * Made slang-test use spSessionHasCompileTargetSupport to ignore tests that cannot run
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 28b504831..ef71430fc 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -1,4 +1,4 @@
-#include "../../slang.h"
+#include "../../slang.h"
#include "../core/slang-io.h"
#include "../core/slang-string-util.h"
@@ -1147,6 +1147,14 @@ SLANG_API ISlangSharedLibraryLoader* spSessionGetSharedLibraryLoader(
return (s->sharedLibraryLoader == Slang::DefaultSharedLibraryLoader::getSingleton()) ? nullptr : s->sharedLibraryLoader.get();
}
+SLANG_API SlangResult spSessionHasCompileTargetSupport(
+ SlangSession* session,
+ SlangCompileTarget target)
+{
+ auto s = SESSION(session);
+ return Slang::hasCodeGenTarget(s, Slang::CodeGenTarget(target)) ? SLANG_OK : SLANG_FAIL;
+}
+
SLANG_API SlangCompileRequest* spCreateCompileRequest(
SlangSession* session)
{