diff options
| author | Yong He <yonghe@outlook.com> | 2018-01-02 22:04:50 -0800 |
|---|---|---|
| committer | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-01-02 22:04:50 -0800 |
| commit | 1e0aabf4b28f48bfbfee7b1a9c08031892c004d0 (patch) | |
| tree | 2ad25a371def11f89cfd77e61116002d6d028bdd /source/slang/parameter-binding.cpp | |
| parent | 66f9a7cefe351d7e0a27fa77fbfe5ca93f2d8133 (diff) | |
no-codegen compile flag and global generics reflection (#347)
* no-codegen compile flag and global generics reflection
1. Add SLANG_COMPILE_FLAG_NO_CODEGEN (-no-codegen) compiler flag to skip code generation stage, so that a shader that uses global generic type parmameters can be parsed, checked and introspected without knowing the final specialization.
2. Add reflection API to query for global generic type parameters, global parameters of generic type, and the generic type parameter index related to a global generic parameter.
3. Add a reflection test case for global generic type parameters.
* add expected result for global-type-params test case.
* fix reflection json output.
* fix branch condition errors
* fix expected result for global-type-params.slang
* fix expected test case output
Diffstat (limited to 'source/slang/parameter-binding.cpp')
| -rw-r--r-- | source/slang/parameter-binding.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/slang/parameter-binding.cpp b/source/slang/parameter-binding.cpp index 4ec4f6fd5..6145015f1 100644 --- a/source/slang/parameter-binding.cpp +++ b/source/slang/parameter-binding.cpp @@ -700,6 +700,7 @@ static void collectGlobalGenericParameter( layout->decl = paramDecl; layout->index = (int)context->shared->programLayout->globalGenericParams.Count(); context->shared->programLayout->globalGenericParams.Add(layout); + context->shared->programLayout->globalGenericParamsMap[layout->decl->getName()->text] = layout.Ptr(); } // Collect a single declaration into our set of parameters |
