HLSL: Add imat, umat, and bmat constructors

Fixes #894
This commit is contained in:
LoopDawg
2017-05-20 21:40:27 -06:00
parent 1d585ac8bd
commit 174ccb8f1d
8 changed files with 987 additions and 18 deletions

View File

@@ -5150,6 +5150,33 @@ bool HlslParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node
case EOpConstructDMat4x2:
case EOpConstructDMat4x3:
case EOpConstructDMat4x4:
case EOpConstructIMat2x2:
case EOpConstructIMat2x3:
case EOpConstructIMat2x4:
case EOpConstructIMat3x2:
case EOpConstructIMat3x3:
case EOpConstructIMat3x4:
case EOpConstructIMat4x2:
case EOpConstructIMat4x3:
case EOpConstructIMat4x4:
case EOpConstructUMat2x2:
case EOpConstructUMat2x3:
case EOpConstructUMat2x4:
case EOpConstructUMat3x2:
case EOpConstructUMat3x3:
case EOpConstructUMat3x4:
case EOpConstructUMat4x2:
case EOpConstructUMat4x3:
case EOpConstructUMat4x4:
case EOpConstructBMat2x2:
case EOpConstructBMat2x3:
case EOpConstructBMat2x4:
case EOpConstructBMat3x2:
case EOpConstructBMat3x3:
case EOpConstructBMat3x4:
case EOpConstructBMat4x2:
case EOpConstructBMat4x3:
case EOpConstructBMat4x4:
constructingMatrix = true;
break;
default:
@@ -7274,6 +7301,15 @@ TIntermTyped* HlslParseContext::constructBuiltIn(const TType& type, TOperator op
case EOpConstructIVec2:
case EOpConstructIVec3:
case EOpConstructIVec4:
case EOpConstructIMat2x2:
case EOpConstructIMat2x3:
case EOpConstructIMat2x4:
case EOpConstructIMat3x2:
case EOpConstructIMat3x3:
case EOpConstructIMat3x4:
case EOpConstructIMat4x2:
case EOpConstructIMat4x3:
case EOpConstructIMat4x4:
case EOpConstructInt:
basicOp = EOpConstructInt;
break;
@@ -7281,6 +7317,15 @@ TIntermTyped* HlslParseContext::constructBuiltIn(const TType& type, TOperator op
case EOpConstructUVec2:
case EOpConstructUVec3:
case EOpConstructUVec4:
case EOpConstructUMat2x2:
case EOpConstructUMat2x3:
case EOpConstructUMat2x4:
case EOpConstructUMat3x2:
case EOpConstructUMat3x3:
case EOpConstructUMat3x4:
case EOpConstructUMat4x2:
case EOpConstructUMat4x3:
case EOpConstructUMat4x4:
case EOpConstructUint:
basicOp = EOpConstructUint;
break;
@@ -7288,6 +7333,15 @@ TIntermTyped* HlslParseContext::constructBuiltIn(const TType& type, TOperator op
case EOpConstructBVec2:
case EOpConstructBVec3:
case EOpConstructBVec4:
case EOpConstructBMat2x2:
case EOpConstructBMat2x3:
case EOpConstructBMat2x4:
case EOpConstructBMat3x2:
case EOpConstructBMat3x3:
case EOpConstructBMat3x4:
case EOpConstructBMat4x2:
case EOpConstructBMat4x3:
case EOpConstructBMat4x4:
case EOpConstructBool:
basicOp = EOpConstructBool;
break;