Merge pull request #901 from LoopDawg/imat-construct

HLSL: Add imat, umat, and bmat constructors
This commit is contained in:
John Kessenich
2017-05-24 23:12:58 -06:00
committed by GitHub
8 changed files with 987 additions and 18 deletions

View File

@@ -5156,6 +5156,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:
@@ -7280,6 +7307,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;
@@ -7287,6 +7323,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;
@@ -7294,6 +7339,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;