From 5ab20eb2d20d491e258047bd94d9d9d0ac5a5dbf Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 23 Feb 2018 17:22:36 -0500 Subject: Refactor IR type system, step 0 Pull BaseType, TextureFlavor and SamplerStateFlavor enums and helper functions into a shared file "type-system-shared.h". --- source/slang/syntax.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/slang/syntax.cpp') 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; -- cgit v1.2.3