glslang and SPIR-V: Some basic turn on for doubles (previously untested but existed code). Partly from a submission, partly addressing bug 13772.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30794 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
87a5e2a84b
commit
edd181944e
10 changed files with 335 additions and 16 deletions
|
|
@ -426,6 +426,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
|
|||
case EOpConstructFloat:
|
||||
promoteTo = EbtFloat;
|
||||
break;
|
||||
case EOpConstructDouble:
|
||||
promoteTo = EbtDouble;
|
||||
break;
|
||||
case EOpConstructInt:
|
||||
promoteTo = EbtInt;
|
||||
break;
|
||||
|
|
@ -1482,7 +1485,7 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC
|
|||
leftUnionArray[i] = rightUnionArray[i];
|
||||
break;
|
||||
case EbtDouble:
|
||||
leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getBConst()));
|
||||
leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getDConst()));
|
||||
break;
|
||||
default:
|
||||
return node;
|
||||
|
|
|
|||
|
|
@ -298,6 +298,7 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
|||
case EOpParameters: out.debug << "Function Parameters: "; break;
|
||||
|
||||
case EOpConstructFloat: out.debug << "Construct float"; break;
|
||||
case EOpConstructDouble:out.debug << "Construct double"; break;
|
||||
case EOpConstructVec2: out.debug << "Construct vec2"; break;
|
||||
case EOpConstructVec3: out.debug << "Construct vec3"; break;
|
||||
case EOpConstructVec4: out.debug << "Construct vec4"; break;
|
||||
|
|
|
|||
|
|
@ -134,12 +134,14 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken)
|
|||
declen++;
|
||||
if (len > 0 || ch != '0') {
|
||||
str[len] = ch;
|
||||
len++;str_len++;
|
||||
len++;
|
||||
str_len++;
|
||||
}
|
||||
ch = getChar();
|
||||
} else {
|
||||
parseContext.error(ppToken->loc, "float literal too long", "", "");
|
||||
len = 1,str_len=1;
|
||||
len = 1;
|
||||
str_len = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue