From 71fca670f3fff13f492548718ba1b2632e733617 Mon Sep 17 00:00:00 2001 From: John Kessenich <cepheus@frii.com> Date: Tue, 12 Feb 2013 08:02:20 +0000 Subject: [PATCH] Allow GLSL construction of matrix from matrix, starting with version 120, and always for ES shaders. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20544 e7fa87d3-cd2b-0410-9028-fcbf551c1848 --- Test/120.frag | 3 +++ glslang/MachineIndependent/ParseHelper.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Test/120.frag b/Test/120.frag index f0c454eeb..85fce22f6 100644 --- a/Test/120.frag +++ b/Test/120.frag @@ -9,6 +9,9 @@ float precision; in vec4 i; out vec4 o; +uniform mat4x2 m; + void main() { + mat2x3 m23 = mat2x3(m); } diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 38db935e6..9ead5dcab 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -587,8 +587,8 @@ bool TParseContext::constructorErrorCheck(int line, TIntermNode* node, TFunction } if (matrixInMatrix && !type->isArray()) { - error(line, "constructing matrix from matrix", "constructor", "(reserved)"); - return true; + profileRequires(line, ENoProfile, 120, 0, "constructing matrix from matrix"); + return false; } if (overFull) { -- GitLab