diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-04-08 10:56:00 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-08 10:56:00 -0400 |
| commit | a9214f34358b2fc0bf61ef90e3719a13b180b423 (patch) | |
| tree | 115b49d976f871a9f529436e201cf2f4a1a59401 /source/slang/slang-type-layout.cpp | |
| parent | ba232e44cbb016a4e7c111b42458394027369c5e (diff) | |
Remove static struct members from layout and reflection (#1310)
* * Added MemberFilterStyle - controls action of FilteredMemberList and FilteredMemberRefList
* Splt out template implementations
* Use more standard method names dofr FilteredMemberRefList
* Added reflect-static.slang test
* Added isNotEmpty/isEmpty to filtered lists
* Added ability to index into filtered list (so not require building of array)
* Default MemberFilterStyle to All.
* Remove explicit MemberFilterStyle::All
Diffstat (limited to 'source/slang/slang-type-layout.cpp')
| -rw-r--r-- | source/slang/slang-type-layout.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source/slang/slang-type-layout.cpp b/source/slang/slang-type-layout.cpp index bd0e6e8e0..f8c2bd377 100644 --- a/source/slang/slang-type-layout.cpp +++ b/source/slang/slang-type-layout.cpp @@ -3424,12 +3424,8 @@ static TypeLayoutResult _createTypeLayout( typeLayoutBuilder.beginLayout(type, rules); auto typeLayout = typeLayoutBuilder.getTypeLayout(); - for (auto field : GetFields(structDeclRef)) + for (auto field : GetFields(structDeclRef, MemberFilterStyle::Instance)) { - // Static fields shouldn't take part in layout. - if(field.getDecl()->HasModifier<HLSLStaticModifier>()) - continue; - // The fields of a `struct` type may include existential (interface) // types (including as nested sub-fields), and any types present // in those fields will need to be specialized based on the |
