diff options
| author | Tim Foley <tim.foley.is@gmail.com> | 2017-08-09 11:20:09 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-09 11:20:09 -0700 |
| commit | 6e4830f4d74adef0a47c6503d84dc114240fafa3 (patch) | |
| tree | 4f549da8c05be186f12442565389d9f3df44c6d7 /source/slang/parameter-binding.cpp | |
| parent | 8e4c0c35d6c2d0fd754b713441c2eee8f13f87b2 (diff) | |
| parent | 695c2700de54a5fec72ce7214c137a1dc3a02d7b (diff) | |
Merge pull request #155 from tfoleyNV/renaming
Major naming overhaul:
Diffstat (limited to 'source/slang/parameter-binding.cpp')
| -rw-r--r-- | source/slang/parameter-binding.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
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<ExpressionType> tryGetEffectiveTypeForGLSLVaryingInput( +RefPtr<Type> tryGetEffectiveTypeForGLSLVaryingInput( ParameterBindingContext* context, VarDeclBase* varDecl) { @@ -428,7 +428,7 @@ RefPtr<ExpressionType> tryGetEffectiveTypeForGLSLVaryingInput( return nullptr; } -RefPtr<ExpressionType> tryGetEffectiveTypeForGLSLVaryingOutput( +RefPtr<Type> tryGetEffectiveTypeForGLSLVaryingOutput( ParameterBindingContext* context, VarDeclBase* varDecl) { @@ -592,14 +592,14 @@ struct EntryPointParameterState static RefPtr<TypeLayout> processEntryPointParameter( ParameterBindingContext* context, - RefPtr<ExpressionType> type, + RefPtr<Type> type, EntryPointParameterState const& state, RefPtr<VarLayout> varLayout); static void collectGlobalScopeGLSLVaryingParameter( ParameterBindingContext* context, RefPtr<VarDeclBase> varDecl, - RefPtr<ExpressionType> effectiveType, + RefPtr<Type> 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<TypeLayout> processSimpleEntryPointParameter( ParameterBindingContext* context, - RefPtr<ExpressionType> type, + RefPtr<Type> type, EntryPointParameterState const& inState, RefPtr<VarLayout> varLayout, int semanticSlotCount = 1) @@ -1147,7 +1147,7 @@ static RefPtr<TypeLayout> processSimpleEntryPointParameter( static RefPtr<TypeLayout> processEntryPointParameterWithPossibleSemantic( ParameterBindingContext* context, Decl* declForSemantic, - RefPtr<ExpressionType> type, + RefPtr<Type> type, EntryPointParameterState const& state, RefPtr<VarLayout> varLayout) { @@ -1178,7 +1178,7 @@ static RefPtr<TypeLayout> processEntryPointParameterWithPossibleSemantic( static RefPtr<TypeLayout> processEntryPointParameter( ParameterBindingContext* context, - RefPtr<ExpressionType> type, + RefPtr<Type> type, EntryPointParameterState const& state, RefPtr<VarLayout> varLayout) { @@ -1235,7 +1235,7 @@ static RefPtr<TypeLayout> processEntryPointParameter( { auto declRef = declRefType->declRef; - if (auto structDeclRef = declRef.As<StructSyntaxNode>()) + if (auto structDeclRef = declRef.As<StructDecl>()) { RefPtr<StructTypeLayout> structLayout = new StructTypeLayout(); structLayout->type = type; @@ -1288,7 +1288,7 @@ static RefPtr<TypeLayout> 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<FunctionSyntaxNode*>(entryPointDecl); + FuncDecl* entryPointFuncDecl = dynamic_cast<FuncDecl*>(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<Variable> 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(); |
