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/check.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source/slang/check.cpp') diff --git a/source/slang/check.cpp b/source/slang/check.cpp index 00c6f6dd0..e07bdf156 100644 --- a/source/slang/check.cpp +++ b/source/slang/check.cpp @@ -311,7 +311,10 @@ namespace Slang const char* libName = DefaultSharedLibraryLoader::getSharedLibraryNameFromType(type); if (SLANG_FAILED(sharedLibraryLoader->loadSharedLibrary(libName, sharedLibraries[int(type)].writeRef()))) { - sink->diagnose(SourceLoc(), Diagnostics::failedToLoadDynamicLibrary, libName); + if (sink) + { + sink->diagnose(SourceLoc(), Diagnostics::failedToLoadDynamicLibrary, libName); + } return nullptr; } } @@ -2072,6 +2075,11 @@ namespace Slang // Has no args SLANG_ASSERT(attr->args.Count() == 0); } + else if (attr.As()) + { + // Has no args + SLANG_ASSERT(attr->args.Count() == 0); + } else { if(attr->args.Count() == 0) -- cgit v1.2.3