summaryrefslogtreecommitdiff
path: root/source/slang/slang-compiler.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-04-23 11:41:33 -0700
committerGitHub <noreply@github.com>2021-04-23 11:41:33 -0700
commitd1b0d5acb22cf8b6258b40c8690cd0c7e3989d3e (patch)
treecc4e9a6ed28c522c5a3f39bbea4c7110936ec593 /source/slang/slang-compiler.h
parentff1d19079fb789a4d64ee16b3212491fdff9bf9a (diff)
Add `ISession::getParameterBlockLayout()` (#1805)
Diffstat (limited to 'source/slang/slang-compiler.h')
-rwxr-xr-xsource/slang/slang-compiler.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/slang/slang-compiler.h b/source/slang/slang-compiler.h
index a3eac6fa6..e57c1683a 100755
--- a/source/slang/slang-compiler.h
+++ b/source/slang/slang-compiler.h
@@ -1198,10 +1198,14 @@ namespace Slang
// TypeLayouts created on the fly by reflection API
Dictionary<Type*, RefPtr<TypeLayout>> typeLayouts;
+ Dictionary<Type*, ParameterBlockType*> parameterBlockTypes;
+
Dictionary<Type*, RefPtr<TypeLayout>>& getTypeLayouts() { return typeLayouts; }
TypeLayout* getTypeLayout(Type* type);
+ TypeLayout* getParameterBlockLayout(Type* type);
+
private:
Linkage* linkage = nullptr;
CodeGenTarget format = CodeGenTarget::Unknown;
@@ -1274,6 +1278,11 @@ namespace Slang
SlangInt targetIndex = 0,
slang::LayoutRules rules = slang::LayoutRules::Default,
ISlangBlob** outDiagnostics = nullptr) override;
+ SLANG_NO_THROW slang::TypeLayoutReflection* SLANG_MCALL getParameterBlockLayout(
+ slang::TypeReflection* elementType,
+ SlangInt targetIndex = 0,
+ slang::LayoutRules rules = slang::LayoutRules::Default,
+ ISlangBlob** outDiagnostics = nullptr) override;
SLANG_NO_THROW SlangResult SLANG_MCALL getTypeRTTIMangledName(
slang::TypeReflection* type,
ISlangBlob** outNameBlob) override;