diff options
| author | Tim Foley <tim.foley.is@gmail.com> | 2017-08-14 18:50:46 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-14 18:50:46 -0700 |
| commit | aeb247cdf02e4dcfc0bb6839cfd291be5128f8ad (patch) | |
| tree | 7314b26e21ded966b6a4fe2430f0421c0c0970bd /source/slang/parameter-binding.cpp | |
| parent | bb66d6eddd649d8861cecefa2d6ccb7a28a827bc (diff) | |
| parent | 9885c972a6bfa6f856e505cdd90d9b71fdbdadaf (diff) | |
Merge pull request #159 from tfoleyNV/name-type
Name type
Diffstat (limited to 'source/slang/parameter-binding.cpp')
| -rw-r--r-- | source/slang/parameter-binding.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/slang/parameter-binding.cpp b/source/slang/parameter-binding.cpp index eeaa04a3f..877597640 100644 --- a/source/slang/parameter-binding.cpp +++ b/source/slang/parameter-binding.cpp @@ -226,7 +226,7 @@ struct ParameterBindingContext LayoutRulesFamilyImpl* layoutRules; // A dictionary to accellerate looking up parameters by name - Dictionary<String, ParameterInfo*> mapNameToParameterInfo; + Dictionary<Name*, ParameterInfo*> mapNameToParameterInfo; // What stage (if any) are we compiling for? Stage stage; @@ -377,17 +377,17 @@ static bool findLayoutArg( // -static String getReflectionName(VarDeclBase* varDecl) +static Name* getReflectionName(VarDeclBase* varDecl) { if (auto reflectionNameModifier = varDecl->FindModifier<ParameterBlockReflectionName>()) - return reflectionNameModifier->nameToken.Content; + return reflectionNameModifier->nameAndLoc.name; return varDecl->getName(); } static bool isGLSLBuiltinName(VarDeclBase* varDecl) { - return getReflectionName(varDecl).StartsWith("gl_"); + return getText(getReflectionName(varDecl)).StartsWith("gl_"); } RefPtr<Type> tryGetEffectiveTypeForGLSLVaryingInput( @@ -1688,7 +1688,7 @@ void generateParameterBindings( programLayout->bindingForHackSampler = (int)binding; RefPtr<Variable> var = new Variable(); - var->Name.Content = "SLANG_hack_samplerForTexelFetch"; + var->nameAndLoc.name = request->getNamePool()->getName("SLANG_hack_samplerForTexelFetch"); var->type.type = getSamplerStateType(request->mSession); auto typeLayout = new TypeLayout(); |
