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
5c202faf
Unverified
Commit
5c202faf
authored
Dec 23, 2020
by
nihui
Committed by
GitHub
Dec 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ParseHelper.cpp
parent
a9e16bd7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+8
-1
No files found.
glslang/MachineIndependent/ParseHelper.cpp
View file @
5c202faf
...
@@ -5417,7 +5417,14 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
...
@@ -5417,7 +5417,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
publicType
.
qualifier
.
layoutBufferReferenceAlign
=
(
unsigned
int
)
log2
(
value
);
#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
);
#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