From f3d70425fa339a0d8f39b920235c98280d250bbb Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 29 May 2020 08:36:10 -0400 Subject: Feature/ast syntax standard (#1360) * Small improvements to documentation and code around DiagnosticSink * Made methods/functions in slang-syntax.h be lowerCamel Removed some commented out source (was placed elsewhere in code) * Making AST related methods and function lowerCamel. Made IsLeftValue -> isLeftValue. --- source/slang/slang-parameter-binding.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/slang/slang-parameter-binding.cpp') diff --git a/source/slang/slang-parameter-binding.cpp b/source/slang/slang-parameter-binding.cpp index c4f7dc9d5..58ce76c45 100644 --- a/source/slang/slang-parameter-binding.cpp +++ b/source/slang/slang-parameter-binding.cpp @@ -707,7 +707,7 @@ static void collectGlobalScopeParameter( auto varDeclRef = shaderParamInfo.paramDeclRef; // We apply any substitutions for global generic parameters here. - auto type = GetType(astBuilder, varDeclRef)->substitute(astBuilder, globalGenericSubst).as(); + auto type = getType(astBuilder, varDeclRef)->substitute(astBuilder, globalGenericSubst).as(); // We use a single operation to both check whether the // variable represents a shader parameter, and to compute @@ -951,7 +951,7 @@ static void maybeDiagnoseMissingVulkanLayoutModifier( // oversight on their part. if( auto registerModifier = varDecl.getDecl()->findModifier() ) { - getSink(context)->diagnose(registerModifier, Diagnostics::registerModifierButNoVulkanLayout, varDecl.GetName()); + getSink(context)->diagnose(registerModifier, Diagnostics::registerModifierButNoVulkanLayout, varDecl.getName()); } } @@ -1007,7 +1007,7 @@ static void addExplicitParameterBindings_GLSL( } if( attr->binding != 0) { - getSink(context)->diagnose(attr, Diagnostics::wholeSpaceParameterRequiresZeroBinding, varDecl.GetName(), attr->binding); + getSink(context)->diagnose(attr, Diagnostics::wholeSpaceParameterRequiresZeroBinding, varDecl.getName(), attr->binding); } semanticInfo.index = attr->set; semanticInfo.space = 0; @@ -1852,7 +1852,7 @@ static RefPtr processEntryPointVaryingParameter( // A matrix is processed as if it was an array of rows else if( auto matrixType = as(type) ) { - auto rowCount = GetIntVal(matrixType->getRowCount()); + auto rowCount = getIntVal(matrixType->getRowCount()); return processSimpleEntryPointParameter(context, matrixType, state, varLayout, (int) rowCount); } else if( auto arrayType = as(type) ) @@ -1860,7 +1860,7 @@ static RefPtr processEntryPointVaryingParameter( // Note: Bad Things will happen if we have an array input // without a semantic already being enforced. - auto elementCount = (UInt) GetIntVal(arrayType->arrayLength); + auto elementCount = (UInt) getIntVal(arrayType->arrayLength); // We use the first element to derive the layout for the element type auto elementTypeLayout = processEntryPointVaryingParameter(context, arrayType->baseType, state, varLayout); @@ -1915,7 +1915,7 @@ static RefPtr processEntryPointVaryingParameter( // Decl* firstExplicit = nullptr; Decl* firstImplicit = nullptr; - for( auto field : GetFields(structDeclRef, MemberFilterStyle::Instance) ) + for( auto field : getFields(structDeclRef, MemberFilterStyle::Instance) ) { RefPtr fieldVarLayout = new VarLayout(); fieldVarLayout->varDecl = field; @@ -1926,7 +1926,7 @@ static RefPtr processEntryPointVaryingParameter( auto fieldTypeLayout = processEntryPointVaryingParameterDecl( context, field.getDecl(), - GetType(context->getASTBuilder(), field), + getType(context->getASTBuilder(), field), state, fieldVarLayout); @@ -2043,7 +2043,7 @@ static RefPtr computeEntryPointParameterTypeLayout( RefPtr paramVarLayout, EntryPointParameterState& state) { - auto paramType = GetType(context->getASTBuilder(), paramDeclRef); + auto paramType = getType(context->getASTBuilder(), paramDeclRef); SLANG_ASSERT(paramType); if( paramDeclRef.getDecl()->hasModifier() ) @@ -2581,7 +2581,7 @@ static RefPtr collectEntryPointParameters( // TODO: Ideally we should make the layout process more robust to empty/void // types and apply this logic unconditionally. // - auto resultType = GetResultType(astBuilder, entryPointFuncDeclRef); + auto resultType = getResultType(astBuilder, entryPointFuncDeclRef); SLANG_ASSERT(resultType); if( !resultType->equals(astBuilder->getVoidType()) ) -- cgit v1.2.3