diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-07-06 09:52:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-06 09:52:53 -0700 |
| commit | 21a14cb4e0d578bc4f8a460016269a1199cac0da (patch) | |
| tree | 88a04619ceaaa37b87199dd82334cc9d102c156d /source/slang/type-layout.h | |
| parent | f313df379dd9e0d4395f072ffb87016a6f20d5a1 (diff) | |
| parent | f145e09a6dcbcf326f782b3e6a76dbf291c792cf (diff) | |
Merge pull request #53 from tfoleyNV/cross-compilation
Initial work on cross-compilation
Diffstat (limited to 'source/slang/type-layout.h')
| -rw-r--r-- | source/slang/type-layout.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/source/slang/type-layout.h b/source/slang/type-layout.h index 07867fddb..ce1f8864d 100644 --- a/source/slang/type-layout.h +++ b/source/slang/type-layout.h @@ -143,8 +143,13 @@ struct SimpleArrayLayoutInfo : SimpleLayoutInfo struct LayoutRulesImpl; +// Base class for things that store layout info +class Layout : public RefObject +{ +}; + // A reified reprsentation of a particular laid-out type -class TypeLayout : public RefObject +class TypeLayout : public Layout { public: // The type that was laid out @@ -215,7 +220,7 @@ enum VarLayoutFlag : VarLayoutFlags }; // A reified layout for a particular variable, field, etc. -class VarLayout : public RefObject +class VarLayout : public Layout { public: // The variable we are laying out @@ -324,7 +329,14 @@ public: // Layout information for a single shader entry point // within a program -class EntryPointLayout : public RefObject +// +// Treated as a subclass of `StructTypeLayout` becase +// it needs to include computed layout information +// for the parameters of the entry point. +// +// TODO: where to store layout info for the return +// type of the function? +class EntryPointLayout : public StructTypeLayout { public: // The corresponding function declaration @@ -332,10 +344,13 @@ public: // The shader profile that was used to compile the entry point Profile profile; + + // Layout for any results of the entry point + RefPtr<VarLayout> resultLayout; }; // Layout information for the global scope of a program -class ProgramLayout : public RefObject +class ProgramLayout : public Layout { public: // We store a layout for the declarations at the global @@ -359,14 +374,6 @@ public: List<RefPtr<EntryPointLayout>> entryPoints; }; -// A modifier to be attached to syntax after we've computed layout -class ComputedLayoutModifier : public Modifier -{ -public: - RefPtr<TypeLayout> typeLayout; -}; - - struct LayoutRulesFamilyImpl; // A delineation of shader parameter types into fine-grained |
