Track things like "(3)" and "+3" as expressions, not literals.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25511 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
35f04bde8a
commit
b35e9bfa21
6 changed files with 36 additions and 20 deletions
|
|
@ -4096,7 +4096,7 @@ void TParseContext::fixBlockXfbOffsets(TSourceLoc loc, TQualifier& qualifier, TT
|
|||
{
|
||||
// "If a block is qualified with xfb_offset, all its
|
||||
// members are assigned transform feedback buffer offsets. If a block is not qualified with xfb_offset, any
|
||||
// members of that block not qualified with an xfb_offsetwill not be assigned transform feedback buffer
|
||||
// members of that block not qualified with an xfb_offset will not be assigned transform feedback buffer
|
||||
// offsets."
|
||||
|
||||
if (! qualifier.hasXfbBuffer() || ! qualifier.hasXfbOffset())
|
||||
|
|
|
|||
|
|
@ -253,7 +253,9 @@ primary_expression
|
|||
$$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $1.loc, true);
|
||||
}
|
||||
| LEFT_PAREN expression RIGHT_PAREN {
|
||||
$$ = $2;
|
||||
$$ = $2;
|
||||
if ($$->getAsConstantUnion())
|
||||
$$->getAsConstantUnion()->setExpression();
|
||||
}
|
||||
;
|
||||
|
||||
|
|
@ -430,8 +432,11 @@ unary_expression
|
|||
parseContext.unaryOpError($1.loc, errorOp, $2->getCompleteString());
|
||||
$$ = $2;
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
$$ = $2;
|
||||
if ($$->getAsConstantUnion())
|
||||
$$->getAsConstantUnion()->setExpression();
|
||||
}
|
||||
}
|
||||
;
|
||||
// Grammar Note: No traditional style type casts.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue