summaryrefslogtreecommitdiffstats
path: root/source/slang/check.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/check.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/check.cpp')
-rw-r--r--source/slang/check.cpp10
1 files changed, 9 insertions, 1 deletions
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<EarlyDepthStencilAttribute>())
+ {
+ // Has no args
+ SLANG_ASSERT(attr->args.Count() == 0);
+ }
else
{
if(attr->args.Count() == 0)