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
c88edb13
Commit
c88edb13
authored
Jul 02, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patch-1' of
https://github.com/HaydnTrigg/glslang
into HaydnTrigg-patch-1
parents
5e701954
e826286f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
Constant.cpp
glslang/MachineIndependent/Constant.cpp
+21
-1
No files found.
glslang/MachineIndependent/Constant.cpp
View file @
c88edb13
...
...
@@ -179,7 +179,27 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
case
EbtDouble
:
case
EbtFloat
:
case
EbtFloat16
:
newConstArray
[
i
].
setDConst
(
leftUnionArray
[
i
].
getDConst
()
/
rightUnionArray
[
i
].
getDConst
());
{
auto
right
=
rightUnionArray
[
i
].
getDConst
();
auto
left
=
leftUnionArray
[
i
].
getDConst
();
if
(
right
)
{
newConstArray
[
i
].
setDConst
(
left
/
right
);
}
else
if
(
left
>
0
)
{
newConstArray
[
i
].
setDConst
((
double
)
INFINITY
);
}
else
if
(
left
<
0
)
{
newConstArray
[
i
].
setDConst
((
double
)
-
INFINITY
);
}
else
{
newConstArray
[
i
].
setDConst
((
double
)
NAN
);
}
}
break
;
case
EbtInt8
:
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