Full stack: distinguish between a scalar and a vector of size 1.
There have been GLSL extensions considering this, and HLSL does it. This is a fully backward compatible change that allows this distinction.
This commit is contained in:
parent
823fc65644
commit
8d72f1a2c4
9 changed files with 152 additions and 29 deletions
|
|
@ -1629,8 +1629,10 @@ bool TIntermBinary::promote()
|
|||
return false;
|
||||
if (left->isVector() && right->isVector() && left->getVectorSize() != right->getVectorSize())
|
||||
return false;
|
||||
if (right->isVector() || right->isMatrix())
|
||||
setType(TType(basicType, EvqTemporary, right->getVectorSize(), right->getMatrixCols(), right->getMatrixRows()));
|
||||
if (right->isVector() || right->isMatrix()) {
|
||||
type.shallowCopy(right->getType());
|
||||
type.getQualifier().makeTemporary();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue