HLSL: Add function call syntax and AST building.
This commit is contained in:
parent
9db3117e38
commit
4678ca9dac
6 changed files with 83 additions and 25 deletions
|
|
@ -754,12 +754,15 @@ TIntermAggregate* HlslParseContext::handleFunctionDefinition(const TSourceLoc& l
|
|||
return paramNodes;
|
||||
}
|
||||
|
||||
void HlslParseContext::handleFunctionArgument(TFunction* function, TIntermAggregate*& arguments, TIntermTyped* arg)
|
||||
void HlslParseContext::handleFunctionArgument(TFunction* function, TIntermTyped*& arguments, TIntermTyped* newArg)
|
||||
{
|
||||
TParameter param = { 0, new TType };
|
||||
param.type->shallowCopy(arg->getType());
|
||||
param.type->shallowCopy(newArg->getType());
|
||||
function->addParameter(param);
|
||||
arguments = intermediate.growAggregate(arguments, arg);
|
||||
if (arguments)
|
||||
arguments = intermediate.growAggregate(arguments, newArg);
|
||||
else
|
||||
arguments = newArg;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue