From e21d5ad650130631e17662ce8f22d15315ab597a Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 21 Nov 2018 13:41:34 -0500 Subject: 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 --- source/slang/slang.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source/slang/slang.cpp') 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) { -- cgit v1.2.3