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
2327da47
Commit
2327da47
authored
May 30, 2013
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for operation semantics, fix one bug it found.
git-svn-id:
https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21798
e7fa87d3-cd2b-0410-9028-fcbf551c1848
parent
69762564
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
testlist
Test/testlist
+1
-0
Intermediate.cpp
glslang/MachineIndependent/Intermediate.cpp
+9
-8
No files found.
Test/testlist
View file @
2327da47
...
...
@@ -26,6 +26,7 @@ comment.frag
300BuiltIns.frag
300layout.vert
300layout.frag
300operations.frag
330.frag
330comp.frag
constErrors.frag
...
...
glslang/MachineIndependent/Intermediate.cpp
View file @
2327da47
...
...
@@ -1119,11 +1119,14 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
break
;
}
// Finish up handling the case where both operands are scalars.
if
(
!
left
->
isVector
()
&&
!
left
->
isMatrix
()
&&
!
right
->
isVector
()
&&
!
right
->
isMatrix
())
// Finish handling the case, for all ops, where both operands are scalars.
if
(
left
->
isScalar
()
&&
right
->
isScalar
())
return
true
;
// Finish handling the case, for all ops, where there are two vectors of different sizes
if
(
left
->
isVector
()
&&
right
->
isVector
()
&&
left
->
getVectorSize
()
!=
right
->
getVectorSize
())
return
false
;
//
// We now have a mix of scalars, vectors, or matrices, for non-relational operations.
//
...
...
@@ -1156,11 +1159,9 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
return
false
;
op
=
EOpMatrixTimesMatrix
;
setType
(
TType
(
basicType
,
EvqTemporary
,
0
,
right
->
getMatrixCols
(),
left
->
getMatrixRows
()));
}
else
if
(
!
left
->
isMatrix
()
&&
!
right
->
isMatrix
())
{
}
else
if
(
!
left
->
isMatrix
()
&&
!
right
->
isMatrix
())
{
if
(
left
->
isVector
()
&&
right
->
isVector
())
{
if
(
left
->
getVectorSize
()
!=
right
->
getVectorSize
())
return
false
;
// leave as component product
;
// leave as component product
}
else
if
(
left
->
isVector
()
||
right
->
isVector
())
{
op
=
EOpVectorTimesScalar
;
if
(
right
->
isVector
())
...
...
@@ -1172,7 +1173,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
}
break
;
case
EOpMulAssign
:
if
(
!
left
->
isMatrix
()
&&
right
->
isMatrix
())
{
if
(
!
left
->
isMatrix
()
&&
right
->
isMatrix
())
{
if
(
left
->
isVector
())
{
if
(
left
->
getVectorSize
()
!=
right
->
getMatrixRows
()
||
left
->
getVectorSize
()
!=
right
->
getMatrixCols
())
return
false
;
...
...
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