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
9325cc01
Unverified
Commit
9325cc01
authored
Dec 24, 2020
by
greg-lunarg
Committed by
GitHub
Dec 24, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2393 from nihui/patch-3
Fix build with android ndk r16b
parents
f426f652
08e4874a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+7
-0
No files found.
glslang/MachineIndependent/ParseHelper.cpp
View file @
9325cc01
...
@@ -5465,7 +5465,14 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
...
@@ -5465,7 +5465,14 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
if
(
!
IsPow2
(
value
))
if
(
!
IsPow2
(
value
))
error
(
loc
,
"must be a power of 2"
,
"buffer_reference_align"
,
""
);
error
(
loc
,
"must be a power of 2"
,
"buffer_reference_align"
,
""
);
else
else
#ifdef __ANDROID__
// Android NDK r15c tageting ABI 15 doesn't have full support for C++11
// (no std::exp2/log2). ::exp2 is available from C99 but ::log2 isn't
// available up until ABI 18 so we use the mathematical equivalent form
publicType
.
qualifier
.
layoutBufferReferenceAlign
=
(
unsigned
int
)(
std
::
log
(
value
)
/
std
::
log
(
2.0
));
#else
publicType
.
qualifier
.
layoutBufferReferenceAlign
=
(
unsigned
int
)
std
::
log2
(
value
);
publicType
.
qualifier
.
layoutBufferReferenceAlign
=
(
unsigned
int
)
std
::
log2
(
value
);
#endif
if
(
nonLiteral
)
if
(
nonLiteral
)
error
(
loc
,
"needs a literal integer"
,
"buffer_reference_align"
,
""
);
error
(
loc
,
"needs a literal integer"
,
"buffer_reference_align"
,
""
);
return
;
return
;
...
...
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