diff options
| author | Yong He <yonghe@outlook.com> | 2018-02-23 17:22:36 -0500 |
|---|---|---|
| committer | Yong He <yonghe@outlook.com> | 2018-02-23 17:41:46 -0500 |
| commit | 5ab20eb2d20d491e258047bd94d9d9d0ac5a5dbf (patch) | |
| tree | be054fb8e5767daa3cfe42c51e812f21b6fbdd72 /source/slang/syntax.cpp | |
| parent | 706675949e70b17860e9ca514c01461fdf9aa95d (diff) | |
Refactor IR type system, step 0
Pull BaseType, TextureFlavor and SamplerStateFlavor enums and helper functions into a shared file "type-system-shared.h".
Diffstat (limited to 'source/slang/syntax.cpp')
| -rw-r--r-- | source/slang/syntax.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/syntax.cpp b/source/slang/syntax.cpp index ab472fe9f..c415568bb 100644 --- a/source/slang/syntax.cpp +++ b/source/slang/syntax.cpp @@ -735,7 +735,7 @@ void Type::accept(IValVisitor* visitor, void* extra) auto type = new SamplerStateType(); type->setSession(session); type->declRef = declRef; - type->flavor = SamplerStateType::Flavor(magicMod->tag); + type->flavor = SamplerStateFlavor(magicMod->tag); return type; } else if (magicMod->name == "Vector") @@ -760,7 +760,7 @@ void Type::accept(IValVisitor* visitor, void* extra) { SLANG_ASSERT(subst && subst->args.Count() >= 1); auto textureType = new TextureType( - TextureType::Flavor(magicMod->tag), + TextureFlavor(magicMod->tag), ExtractGenericArgType(subst->args[0])); textureType->setSession(session); textureType->declRef = declRef; @@ -770,7 +770,7 @@ void Type::accept(IValVisitor* visitor, void* extra) { SLANG_ASSERT(subst && subst->args.Count() >= 1); auto textureType = new TextureSamplerType( - TextureType::Flavor(magicMod->tag), + TextureFlavor(magicMod->tag), ExtractGenericArgType(subst->args[0])); textureType->setSession(session); textureType->declRef = declRef; @@ -780,7 +780,7 @@ void Type::accept(IValVisitor* visitor, void* extra) { SLANG_ASSERT(subst && subst->args.Count() >= 1); auto textureType = new GLSLImageType( - TextureType::Flavor(magicMod->tag), + TextureFlavor(magicMod->tag), ExtractGenericArgType(subst->args[0])); textureType->setSession(session); textureType->declRef = declRef; |
