Unify constant floats and constant doubles; they can all be constant doubles.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21921 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
50a8cabbbb
commit
fddf3ce3a1
8 changed files with 72 additions and 105 deletions
|
|
@ -80,7 +80,6 @@ extern void yyerror(const char*);
|
|||
TSourceLoc line;
|
||||
union {
|
||||
TString *string;
|
||||
float f;
|
||||
int i;
|
||||
unsigned int u;
|
||||
bool b;
|
||||
|
|
@ -278,7 +277,7 @@ primary_expression
|
|||
}
|
||||
| FLOATCONSTANT {
|
||||
constUnion *unionArray = new constUnion[1];
|
||||
unionArray->setFConst($1.f);
|
||||
unionArray->setDConst($1.d);
|
||||
$$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), $1.line);
|
||||
}
|
||||
| DOUBLECONSTANT {
|
||||
|
|
@ -360,7 +359,7 @@ postfix_expression
|
|||
|
||||
if ($$ == 0) {
|
||||
constUnion *unionArray = new constUnion[1];
|
||||
unionArray->setFConst(0.0f);
|
||||
unionArray->setDConst(0.0);
|
||||
$$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), $2.line);
|
||||
} else {
|
||||
TType newType($1->getType());
|
||||
|
|
@ -594,7 +593,7 @@ function_call
|
|||
// error message was put out by PaFindFunction()
|
||||
// Put on a dummy node for error recovery
|
||||
constUnion *unionArray = new constUnion[1];
|
||||
unionArray->setFConst(0.0f);
|
||||
unionArray->setDConst(0.0);
|
||||
$$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), $1.line);
|
||||
parseContext.recover();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue