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
8b64fa54
Commit
8b64fa54
authored
Aug 17, 2015
by
Andrew Woloszyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for compiling glslang on Android.
Primarily fix is due to Android not supporting std::to_string().
parent
f99b7dde
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
0 deletions
+20
-0
SPVRemapper.cpp
SPIRV/SPVRemapper.cpp
+1
-0
CMakeLists.txt
StandAlone/CMakeLists.txt
+2
-0
Common.h
glslang/Include/Common.h
+11
-0
intermOut.cpp
glslang/MachineIndependent/intermOut.cpp
+2
-0
ossource.cpp
glslang/OSDependent/Linux/ossource.cpp
+4
-0
No files found.
SPIRV/SPVRemapper.cpp
View file @
8b64fa54
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
#include <algorithm>
#include <algorithm>
#include <cassert>
#include <cassert>
#include "../glslang/Include/Common.h"
namespace
spv
{
namespace
spv
{
...
...
StandAlone/CMakeLists.txt
View file @
8b64fa54
...
@@ -24,7 +24,9 @@ set(LIBRARIES
...
@@ -24,7 +24,9 @@ set(LIBRARIES
if
(
WIN32
)
if
(
WIN32
)
set
(
LIBRARIES
${
LIBRARIES
}
psapi
)
set
(
LIBRARIES
${
LIBRARIES
}
psapi
)
elseif
(
UNIX
)
elseif
(
UNIX
)
if
(
NOT ANDROID
)
set
(
LIBRARIES
${
LIBRARIES
}
pthread
)
set
(
LIBRARIES
${
LIBRARIES
}
pthread
)
endif
()
endif
(
WIN32
)
endif
(
WIN32
)
target_link_libraries
(
glslangValidator
${
LIBRARIES
}
)
target_link_libraries
(
glslangValidator
${
LIBRARIES
}
)
...
...
glslang/Include/Common.h
View file @
8b64fa54
...
@@ -51,6 +51,17 @@
...
@@ -51,6 +51,17 @@
#define UINT_PTR uintptr_t
#define UINT_PTR uintptr_t
#endif
#endif
#ifdef __ANDROID__
#include <sstream>
namespace
std
{
template
<
typename
T
>
std
::
string
to_string
(
const
T
&
val
)
{
std
::
ostringstream
os
;
os
<<
val
;
return
os
.
str
();
}
}
#endif
/* windows only pragma */
/* windows only pragma */
#ifdef _MSC_VER
#ifdef _MSC_VER
#pragma warning(disable : 4786) // Don't warn about too long identifiers
#pragma warning(disable : 4786) // Don't warn about too long identifiers
...
...
glslang/MachineIndependent/intermOut.cpp
View file @
8b64fa54
...
@@ -48,6 +48,8 @@ namespace {
...
@@ -48,6 +48,8 @@ namespace {
bool
is_positive_infinity
(
double
x
)
{
bool
is_positive_infinity
(
double
x
)
{
#ifdef _MSC_VER
#ifdef _MSC_VER
return
_fpclass
(
x
)
==
_FPCLASS_PINF
;
return
_fpclass
(
x
)
==
_FPCLASS_PINF
;
#elif defined __ANDROID__
return
std
::
isinf
(
x
)
&&
(
x
>=
0
);
#else
#else
return
isinf
(
x
)
&&
(
x
>=
0
);
return
isinf
(
x
)
&&
(
x
>=
0
);
#endif
#endif
...
...
glslang/OSDependent/Linux/ossource.cpp
View file @
8b64fa54
...
@@ -62,6 +62,9 @@ void DetachThreadLinux(void *)
...
@@ -62,6 +62,9 @@ void DetachThreadLinux(void *)
//
//
void
OS_CleanupThreadData
(
void
)
void
OS_CleanupThreadData
(
void
)
{
{
#ifdef __ANDROID__
DetachThread
();
#else
int
old_cancel_state
,
old_cancel_type
;
int
old_cancel_state
,
old_cancel_type
;
void
*
cleanupArg
=
NULL
;
void
*
cleanupArg
=
NULL
;
...
@@ -85,6 +88,7 @@ void OS_CleanupThreadData(void)
...
@@ -85,6 +88,7 @@ void OS_CleanupThreadData(void)
// Restore the thread's previous cancellation mode.
// Restore the thread's previous cancellation mode.
//
//
pthread_setcanceltype
(
old_cancel_state
,
NULL
);
pthread_setcanceltype
(
old_cancel_state
,
NULL
);
#endif
}
}
...
...
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