diff options
Diffstat (limited to 'source/slang/type-layout.h')
| -rw-r--r-- | source/slang/type-layout.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/source/slang/type-layout.h b/source/slang/type-layout.h index b3b1ed1df..18a51c155 100644 --- a/source/slang/type-layout.h +++ b/source/slang/type-layout.h @@ -924,16 +924,19 @@ RefPtr<ParameterGroupTypeLayout> createParameterGroupTypeLayout( TypeLayoutContext const& context, RefPtr<ParameterGroupType> parameterGroupType); - /// Create a layout for a parameter-group type (a `ConstantBuffer` or `ParameterBlock`). + /// Create a wrapper constant buffer type layout, if needed. /// - /// This overload allows the `parameterGroupType` parameter to be null, for cases - /// where an anonymous parameter group needs to be constructed. + /// When dealing with entry-point `uniform` and global-scope parameters, + /// we want to create a wrapper constant buffer for all the parameters + /// if and only if there exist some parameters that use "ordinary" data + /// (`LayoutResourceKind::Uniform`). /// -RefPtr<ParameterGroupTypeLayout> createParameterGroupTypeLayout( + /// This function determines whether such a wrapper is needed, based + /// on the `elementTypeLayout` given, and either creates and returns + /// the layout for the wrapper, or the unmodified `elementTypeLayout`. + /// +RefPtr<TypeLayout> createConstantBufferTypeLayoutIfNeeded( TypeLayoutContext const& context, - RefPtr<ParameterGroupType> parameterGroupType, - LayoutRulesImpl* parameterGroupRules, - SimpleLayoutInfo parameterGroupInfo, RefPtr<TypeLayout> elementTypeLayout); // Create a type layout for a structured buffer type. |
