From 695c2700de54a5fec72ce7214c137a1dc3a02d7b Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Wed, 9 Aug 2017 10:13:40 -0700 Subject: Major naming overhaul: - `ExpressionSyntaxNode` becomes `Expr` - `StatementSyntaxNode` becomes `Stmt` - `StructSyntaxNode` becomes `StructDecl` - `ProgramSyntaxNode` becomes `ModuleDecl` - `ExpressionType` becomes `Type` - Existing fields names `Type` become `type` - There might be some collateral damage here if there were, e.g., `enum`s named `Type`, but I can live with that for now and fix those up as a I see them --- source/slang/parameter-binding.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'source/slang/parameter-binding.cpp') diff --git a/source/slang/parameter-binding.cpp b/source/slang/parameter-binding.cpp index 9b1036d02..eeaa04a3f 100644 --- a/source/slang/parameter-binding.cpp +++ b/source/slang/parameter-binding.cpp @@ -390,7 +390,7 @@ static bool isGLSLBuiltinName(VarDeclBase* varDecl) return getReflectionName(varDecl).StartsWith("gl_"); } -RefPtr tryGetEffectiveTypeForGLSLVaryingInput( +RefPtr tryGetEffectiveTypeForGLSLVaryingInput( ParameterBindingContext* context, VarDeclBase* varDecl) { @@ -428,7 +428,7 @@ RefPtr tryGetEffectiveTypeForGLSLVaryingInput( return nullptr; } -RefPtr tryGetEffectiveTypeForGLSLVaryingOutput( +RefPtr tryGetEffectiveTypeForGLSLVaryingOutput( ParameterBindingContext* context, VarDeclBase* varDecl) { @@ -592,14 +592,14 @@ struct EntryPointParameterState static RefPtr processEntryPointParameter( ParameterBindingContext* context, - RefPtr type, + RefPtr type, EntryPointParameterState const& state, RefPtr varLayout); static void collectGlobalScopeGLSLVaryingParameter( ParameterBindingContext* context, RefPtr varDecl, - RefPtr effectiveType, + RefPtr effectiveType, EntryPointParameterDirection direction) { int defaultSemanticIndex = 0; @@ -994,7 +994,7 @@ static void completeBindingsForParameter( static void collectGlobalScopeParameters( ParameterBindingContext* context, - ProgramSyntaxNode* program) + ModuleDecl* program) { // First enumerate parameters at global scope for( auto decl : program->Members ) @@ -1066,7 +1066,7 @@ SimpleSemanticInfo decomposeSimpleSemantic( static RefPtr processSimpleEntryPointParameter( ParameterBindingContext* context, - RefPtr type, + RefPtr type, EntryPointParameterState const& inState, RefPtr varLayout, int semanticSlotCount = 1) @@ -1147,7 +1147,7 @@ static RefPtr processSimpleEntryPointParameter( static RefPtr processEntryPointParameterWithPossibleSemantic( ParameterBindingContext* context, Decl* declForSemantic, - RefPtr type, + RefPtr type, EntryPointParameterState const& state, RefPtr varLayout) { @@ -1178,7 +1178,7 @@ static RefPtr processEntryPointParameterWithPossibleSemantic( static RefPtr processEntryPointParameter( ParameterBindingContext* context, - RefPtr type, + RefPtr type, EntryPointParameterState const& state, RefPtr varLayout) { @@ -1235,7 +1235,7 @@ static RefPtr processEntryPointParameter( { auto declRef = declRefType->declRef; - if (auto structDeclRef = declRef.As()) + if (auto structDeclRef = declRef.As()) { RefPtr structLayout = new StructTypeLayout(); structLayout->type = type; @@ -1288,7 +1288,7 @@ static RefPtr processEntryPointParameter( static void collectEntryPointParameters( ParameterBindingContext* context, EntryPointRequest* entryPoint, - ProgramSyntaxNode* translationUnitSyntax) + ModuleDecl* translationUnitSyntax) { // First, look for the entry point with the specified name @@ -1307,7 +1307,7 @@ static void collectEntryPointParameters( return; } - FunctionSyntaxNode* entryPointFuncDecl = dynamic_cast(entryPointDecl); + FuncDecl* entryPointFuncDecl = dynamic_cast(entryPointDecl); if( !entryPointFuncDecl ) { // Not a function! @@ -1368,7 +1368,7 @@ static void collectEntryPointParameters( auto paramTypeLayout = processEntryPointParameterWithPossibleSemantic( context, paramDecl.Ptr(), - paramDecl->Type.type, + paramDecl->type.type, state, paramVarLayout); @@ -1443,7 +1443,7 @@ inferStageForTranslationUnit( static void collectModuleParameters( ParameterBindingContext* inContext, - ProgramSyntaxNode* module) + ModuleDecl* module) { // Each loaded module provides a separate (logical) namespace for // parameters, so that two parameters with the same name, in @@ -1689,10 +1689,10 @@ void generateParameterBindings( RefPtr var = new Variable(); var->Name.Content = "SLANG_hack_samplerForTexelFetch"; - var->Type.type = getSamplerStateType(request->mSession); + var->type.type = getSamplerStateType(request->mSession); auto typeLayout = new TypeLayout(); - typeLayout->type = var->Type.type; + typeLayout->type = var->type.type; typeLayout->addResourceUsage(LayoutResourceKind::DescriptorTableSlot, 1); auto varLayout = new VarLayout(); -- cgit v1.2.3