Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
b587fb62
Commit
b587fb62
authored
Feb 15, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GLSL: Fix #1247. Remove extraneous *= matrix test.
parent
98e3fb19
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
2 deletions
+17
-2
matrix2.frag.out
Test/baseResults/matrix2.frag.out
+6
-0
matrixError.vert.out
Test/baseResults/matrixError.vert.out
+7
-1
matrix2.frag
Test/matrix2.frag
+1
-0
matrixError.vert
Test/matrixError.vert
+2
-0
Intermediate.cpp
glslang/MachineIndependent/Intermediate.cpp
+1
-1
No files found.
Test/baseResults/matrix2.frag.out
View file @
b587fb62
...
@@ -158,6 +158,9 @@ Shader version: 150
...
@@ -158,6 +158,9 @@ Shader version: 150
0:49 'FragColor' ( out 4-component vector of float)
0:49 'FragColor' ( out 4-component vector of float)
0:49 Constant:
0:49 Constant:
0:49 3 (const int)
0:49 3 (const int)
0:50 matrix mult second child into first child ( temp 3X4 matrix of float)
0:50 'm34' ( temp 3X4 matrix of float)
0:50 'colorTransform' ( uniform 3X3 matrix of float)
0:? Linker Objects
0:? Linker Objects
0:? 'colorTransform' ( uniform 3X3 matrix of float)
0:? 'colorTransform' ( uniform 3X3 matrix of float)
0:? 'Color' ( smooth in 3-component vector of float)
0:? 'Color' ( smooth in 3-component vector of float)
...
@@ -331,6 +334,9 @@ Shader version: 150
...
@@ -331,6 +334,9 @@ Shader version: 150
0:49 'FragColor' ( out 4-component vector of float)
0:49 'FragColor' ( out 4-component vector of float)
0:49 Constant:
0:49 Constant:
0:49 3 (const int)
0:49 3 (const int)
0:50 matrix mult second child into first child ( temp 3X4 matrix of float)
0:50 'm34' ( temp 3X4 matrix of float)
0:50 'colorTransform' ( uniform 3X3 matrix of float)
0:? Linker Objects
0:? Linker Objects
0:? 'colorTransform' ( uniform 3X3 matrix of float)
0:? 'colorTransform' ( uniform 3X3 matrix of float)
0:? 'Color' ( smooth in 3-component vector of float)
0:? 'Color' ( smooth in 3-component vector of float)
...
...
Test/baseResults/matrixError.vert.out
View file @
b587fb62
...
@@ -6,7 +6,9 @@ ERROR: 0:18: 'assign' : cannot convert from ' temp 2-component vector of float'
...
@@ -6,7 +6,9 @@ ERROR: 0:18: 'assign' : cannot convert from ' temp 2-component vector of float'
ERROR: 0:19: 'xy' : does not apply to this type: temp 2X3 matrix of float
ERROR: 0:19: 'xy' : does not apply to this type: temp 2X3 matrix of float
ERROR: 0:21: '[' : matrix index out of range '2'
ERROR: 0:21: '[' : matrix index out of range '2'
ERROR: 0:21: '[' : vector index out of range '4'
ERROR: 0:21: '[' : vector index out of range '4'
ERROR: 7 compilation errors. No code generated.
ERROR: 0:22: 'assign' : cannot convert from ' temp 2X3 matrix of float' to ' temp 2X3 matrix of float'
ERROR: 0:23: 'assign' : cannot convert from ' uniform 3X2 matrix of float' to ' temp 2X3 matrix of float'
ERROR: 9 compilation errors. No code generated.
Shader version: 120
Shader version: 120
...
@@ -32,6 +34,8 @@ ERROR: node is still EOpNull!
...
@@ -32,6 +34,8 @@ ERROR: node is still EOpNull!
0:21 2 (const int)
0:21 2 (const int)
0:21 Constant:
0:21 Constant:
0:21 4 (const int)
0:21 4 (const int)
0:22 'm23' ( temp 2X3 matrix of float)
0:23 'm23' ( temp 2X3 matrix of float)
0:? Linker Objects
0:? Linker Objects
0:? 'v3' ( in 3-component vector of float)
0:? 'v3' ( in 3-component vector of float)
0:? 'm32' ( uniform 3X2 matrix of float)
0:? 'm32' ( uniform 3X2 matrix of float)
...
@@ -64,6 +68,8 @@ ERROR: node is still EOpNull!
...
@@ -64,6 +68,8 @@ ERROR: node is still EOpNull!
0:21 2 (const int)
0:21 2 (const int)
0:21 Constant:
0:21 Constant:
0:21 4 (const int)
0:21 4 (const int)
0:22 'm23' ( temp 2X3 matrix of float)
0:23 'm23' ( temp 2X3 matrix of float)
0:? Linker Objects
0:? Linker Objects
0:? 'v3' ( in 3-component vector of float)
0:? 'v3' ( in 3-component vector of float)
0:? 'm32' ( uniform 3X2 matrix of float)
0:? 'm32' ( uniform 3X2 matrix of float)
...
...
Test/matrix2.frag
View file @
b587fb62
...
@@ -47,4 +47,5 @@ void main()
...
@@ -47,4 +47,5 @@ void main()
FragColor
*=
inv4
;
FragColor
*=
inv4
;
FragColor
=
vec4
(
FragColor
*
matrixCompMult
(
un34
,
un34
),
FragColor
.
w
);
FragColor
=
vec4
(
FragColor
*
matrixCompMult
(
un34
,
un34
),
FragColor
.
w
);
m34
*=
colorTransform
;
}
}
Test/matrixError.vert
View file @
b587fb62
...
@@ -19,4 +19,6 @@ void main()
...
@@ -19,4 +19,6 @@ void main()
m23
.
xy
;
// ERROR, can't use .
m23
.
xy
;
// ERROR, can't use .
gl_Position
=
vec4
(
m23
*
m32
*
v3
,
m24
[
2
][
4
]);
// ERROR, 2 and 4 are out of range
gl_Position
=
vec4
(
m23
*
m32
*
v3
,
m24
[
2
][
4
]);
// ERROR, 2 and 4 are out of range
m23
*=
m23
;
// ERROR, right side needs to be square
m23
*=
m32
;
// ERROR, left columns must match right rows
}
}
glslang/MachineIndependent/Intermediate.cpp
View file @
b587fb62
...
@@ -2706,7 +2706,7 @@ bool TIntermediate::promoteBinary(TIntermBinary& node)
...
@@ -2706,7 +2706,7 @@ bool TIntermediate::promoteBinary(TIntermBinary& node)
node
.
setOp
(
op
=
EOpMatrixTimesScalarAssign
);
node
.
setOp
(
op
=
EOpMatrixTimesScalarAssign
);
}
}
}
else
if
(
left
->
isMatrix
()
&&
right
->
isMatrix
())
{
}
else
if
(
left
->
isMatrix
()
&&
right
->
isMatrix
())
{
if
(
left
->
getMatrixCols
()
!=
left
->
getMatrixRows
()
||
left
->
getMatrixCols
()
!=
right
->
getMatrixCols
()
||
left
->
getMatrixCols
()
!=
right
->
getMatrixRows
())
if
(
left
->
getMatrixCols
()
!=
right
->
getMatrixCols
()
||
left
->
getMatrixCols
()
!=
right
->
getMatrixRows
())
return
false
;
return
false
;
node
.
setOp
(
op
=
EOpMatrixTimesMatrixAssign
);
node
.
setOp
(
op
=
EOpMatrixTimesMatrixAssign
);
}
else
if
(
!
left
->
isMatrix
()
&&
!
right
->
isMatrix
())
{
}
else
if
(
!
left
->
isMatrix
()
&&
!
right
->
isMatrix
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment