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
513cc4cf
Commit
513cc4cf
authored
Jul 02, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'HaydnTrigg-patch-1'
parents
5e701954
c88edb13
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
2 deletions
+13
-2
constFold.frag.out
Test/baseResults/constFold.frag.out
+4
-0
constFold.frag
Test/constFold.frag
+1
-1
revision.h
glslang/Include/revision.h
+1
-1
Constant.cpp
glslang/MachineIndependent/Constant.cpp
+7
-0
No files found.
Test/baseResults/constFold.frag.out
View file @
513cc4cf
...
@@ -179,6 +179,10 @@ ERROR: node is still EOpNull!
...
@@ -179,6 +179,10 @@ ERROR: node is still EOpNull!
0:83 2147483647 (const int)
0:83 2147483647 (const int)
0:84 Constant:
0:84 Constant:
0:84 +1.#INF
0:84 +1.#INF
0:84 Constant:
0:84 -1.#INF
0:84 Constant:
0:84 1.#IND
0:88 Constant:
0:88 Constant:
0:88 2 (const uint)
0:88 2 (const uint)
0:88 3 (const uint)
0:88 3 (const uint)
...
...
Test/constFold.frag
100644 → 100755
View file @
513cc4cf
...
@@ -81,7 +81,7 @@ void foo()
...
@@ -81,7 +81,7 @@ void foo()
a
[
0
]
=
s
.
m
[
1
].
z
;
// 7.0
a
[
0
]
=
s
.
m
[
1
].
z
;
// 7.0
b
%
0
;
// int
b
%
0
;
// int
b
/
0
;
b
/
0
;
e
/
0
;
e
/
0
;
-
e
/
0
;
0
.
0
/
0
.
0
;
const
uint
ua
=
5
;
const
uint
ua
=
5
;
const
uvec2
ub
=
uvec2
(
6
,
7
);
const
uvec2
ub
=
uvec2
(
6
,
7
);
const
uint
uc
=
8
;
const
uint
uc
=
8
;
...
...
glslang/Include/revision.h
View file @
513cc4cf
// This header is generated by the make-revision script.
// This header is generated by the make-revision script.
#define GLSLANG_PATCH_LEVEL 27
87
#define GLSLANG_PATCH_LEVEL 27
93
glslang/MachineIndependent/Constant.cpp
View file @
513cc4cf
...
@@ -179,7 +179,14 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
...
@@ -179,7 +179,14 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
case
EbtDouble
:
case
EbtDouble
:
case
EbtFloat
:
case
EbtFloat
:
case
EbtFloat16
:
case
EbtFloat16
:
if
(
rightUnionArray
[
i
].
getDConst
()
!=
0.0
)
newConstArray
[
i
].
setDConst
(
leftUnionArray
[
i
].
getDConst
()
/
rightUnionArray
[
i
].
getDConst
());
newConstArray
[
i
].
setDConst
(
leftUnionArray
[
i
].
getDConst
()
/
rightUnionArray
[
i
].
getDConst
());
else
if
(
leftUnionArray
[
i
].
getDConst
()
>
0.0
)
newConstArray
[
i
].
setDConst
((
double
)
INFINITY
);
else
if
(
leftUnionArray
[
i
].
getDConst
()
<
0.0
)
newConstArray
[
i
].
setDConst
((
double
)
-
INFINITY
);
else
newConstArray
[
i
].
setDConst
((
double
)
NAN
);
break
;
break
;
case
EbtInt8
:
case
EbtInt8
:
if
(
rightUnionArray
[
i
]
==
(
signed
char
)
0
)
if
(
rightUnionArray
[
i
]
==
(
signed
char
)
0
)
...
...
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