summaryrefslogtreecommitdiffstats
path: root/source/slang/parameter-binding.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2017-07-17 10:27:52 -0700
committerGitHub <noreply@github.com>2017-07-17 10:27:52 -0700
commit0b4992fb69e359a7e566cca42331a196904556f5 (patch)
tree687ae0e64e7b2cc4624e785f76b6ee8061e3ba20 /source/slang/parameter-binding.cpp
parentc69060a75c20ee60b891622f0acd9ed598cb468e (diff)
parent782e6f0f675fd858acfdc66e5ea1fa46a646df71 (diff)
Merge pull request #108 from tfoleyNV/gh-105
Don't crash-fail on errors in entry point parameters
Diffstat (limited to 'source/slang/parameter-binding.cpp')
-rw-r--r--source/slang/parameter-binding.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/slang/parameter-binding.cpp b/source/slang/parameter-binding.cpp
index 007c023e2..8a8a993cd 100644
--- a/source/slang/parameter-binding.cpp
+++ b/source/slang/parameter-binding.cpp
@@ -994,6 +994,11 @@ static RefPtr<TypeLayout> processEntryPointParameter(
assert(!"unimplemented");
}
}
+ // If we ran into an error in checking the user's code, then skip this parameter
+ else if( auto errorType = type->As<ErrorType>() )
+ {
+ return nullptr;
+ }
else
{
assert(!"unimplemented");
@@ -1090,6 +1095,10 @@ static void collectEntryPointParameters(
state,
paramVarLayout);
+ // Skip parameters for which we could not compute a layout
+ if(!paramTypeLayout)
+ continue;
+
paramVarLayout->typeLayout = paramTypeLayout;
for (auto rr : paramTypeLayout->resourceInfos)