diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-07-17 09:47:23 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-07-17 09:47:23 -0700 |
| commit | fbae51ff49eeb6b6494be5412b52da1273ad61be (patch) | |
| tree | b40b749663306bcaa760bea31e7a0ebbb58b99bb /source | |
| parent | fdab35e93082d6da4f9dbb4b6ec7b4c6dbce831c (diff) | |
Skip unknown types during parameter-binding/-reflection step
Work on #105
If a semantic error occurs in the type of an entry-point parameter, we need to be able to skip over it when doing parameter binding and reflection-generation work.
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/parameter-binding.cpp | 9 |
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) |
