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
51d672b8
Unverified
Commit
51d672b8
authored
Feb 25, 2021
by
greg-lunarg
Committed by
GitHub
Feb 25, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2544 from ZhiqianXia/master
Replace log2 and exp2 math func.
parents
00c6d2d4
47a21828
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
Constant.cpp
glslang/MachineIndependent/Constant.cpp
+4
-10
No files found.
glslang/MachineIndependent/Constant.cpp
View file @
51d672b8
...
...
@@ -599,17 +599,11 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
newConstArray
[
i
].
setDConst
(
log
(
unionArray
[
i
].
getDConst
()));
break
;
case
EOpExp2
:
{
const
double
inv_log2_e
=
0.69314718055994530941723212145818
;
newConstArray
[
i
].
setDConst
(
exp
(
unionArray
[
i
].
getDConst
()
*
inv_log2_e
));
break
;
}
newConstArray
[
i
].
setDConst
(
exp2
(
unionArray
[
i
].
getDConst
()));
break
;
case
EOpLog2
:
{
const
double
log2_e
=
1.4426950408889634073599246810019
;
newConstArray
[
i
].
setDConst
(
log2_e
*
log
(
unionArray
[
i
].
getDConst
()));
break
;
}
newConstArray
[
i
].
setDConst
(
log2
(
unionArray
[
i
].
getDConst
()));
break
;
case
EOpSqrt
:
newConstArray
[
i
].
setDConst
(
sqrt
(
unionArray
[
i
].
getDConst
()));
break
;
...
...
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