diff options
| author | dubiousconst282 <87553666+dubiousconst282@users.noreply.github.com> | 2024-07-24 18:20:06 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-24 14:20:06 -0700 |
| commit | efa8d1ab40c24a15678dd4143c9cc7b7b64e04d8 (patch) | |
| tree | d2df663078d6058dce9fb30920d1ce3415fbb4a4 /source/slang/slang-type-layout.cpp | |
| parent | 639576cbe9d9cf604c554fda8dda48485201704f (diff) | |
Add generic descriptor indexing intrinsic (#4389)
* Add ResourceArray intrinsic type
* Move aliased parameter generation to GLSL legalization
* Add DynamicResourceEntry type for proxying layout of GenericResourceArray
* Reimplement as DynamicResource
* Add reflection test
* Don't reuse alias cache between different parameters
* Add dynamic cast extensions for buffer types
* Minor format fix
* Fix VarDecl diagnostics after finding non-appliable initializer candidates
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-type-layout.cpp')
| -rw-r--r-- | source/slang/slang-type-layout.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-type-layout.cpp b/source/slang/slang-type-layout.cpp index eca0d0ec3..f85fb2c5f 100644 --- a/source/slang/slang-type-layout.cpp +++ b/source/slang/slang-type-layout.cpp @@ -4389,6 +4389,13 @@ static TypeLayoutResult _createTypeLayout( return result; } + else if (as<DynamicResourceType>(type)) + { + return createSimpleTypeLayout( + SimpleLayoutInfo(LayoutResourceKind::DescriptorTableSlot, 1), + type, + rules); + } else if (auto declRefType = as<DeclRefType>(type)) { auto declRef = declRefType->getDeclRef(); |
