[Mesa-dev] [PATCH] Android: use bionic pthread_barrier_* if possible
The pthread_barrier_* functions were introduced to bionic since Nougat. Signed-off-by: Chih-Wei Huang --- Android.common.mk| 1 + src/gallium/auxiliary/os/os_thread.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Android.common.mk b/Android.common.mk index 57c31fc..44ad97b 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -44,6 +44,7 @@ LOCAL_CFLAGS += \ # It's likely due to a bug elsewhere, but let's temporarily add them # here to fix the radeonsi build. LOCAL_CFLAGS += \ + -DANDROID_API_LEVEL=$(PLATFORM_SDK_VERSION) \ -DENABLE_SHADER_CACHE \ -D__STDC_CONSTANT_MACROS \ -D__STDC_LIMIT_MACROS \ diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h index b6e0698..0a238e5 100644 --- a/src/gallium/auxiliary/os/os_thread.h +++ b/src/gallium/auxiliary/os/os_thread.h @@ -75,7 +75,7 @@ __pipe_mutex_assert_locked(mtx_t *mutex) * pipe_barrier */ -#if (defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HURD)) && !defined(PIPE_OS_ANDROID) +#if (defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HURD)) && (!defined(PIPE_OS_ANDROID) || ANDROID_API_LEVEL >= 24) typedef pthread_barrier_t pipe_barrier; -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: use bionic pthread_barrier_* if possible
that seems the case Acked-by: Tapani Pälli On 06/04/2017 07:53 AM, Chih-Wei Huang wrote: The pthread_barrier_* functions were introduced to bionic since Nougat. Signed-off-by: Chih-Wei Huang --- Android.common.mk| 1 + src/gallium/auxiliary/os/os_thread.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Android.common.mk b/Android.common.mk index 57c31fc..44ad97b 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -44,6 +44,7 @@ LOCAL_CFLAGS += \ # It's likely due to a bug elsewhere, but let's temporarily add them # here to fix the radeonsi build. LOCAL_CFLAGS += \ + -DANDROID_API_LEVEL=$(PLATFORM_SDK_VERSION) \ -DENABLE_SHADER_CACHE \ -D__STDC_CONSTANT_MACROS \ -D__STDC_LIMIT_MACROS \ diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h index b6e0698..0a238e5 100644 --- a/src/gallium/auxiliary/os/os_thread.h +++ b/src/gallium/auxiliary/os/os_thread.h @@ -75,7 +75,7 @@ __pipe_mutex_assert_locked(mtx_t *mutex) * pipe_barrier */ -#if (defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HURD)) && !defined(PIPE_OS_ANDROID) +#if (defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HURD)) && (!defined(PIPE_OS_ANDROID) || ANDROID_API_LEVEL >= 24) typedef pthread_barrier_t pipe_barrier; ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: use bionic pthread_barrier_* if possible
On 5 June 2017 at 09:27, Tapani Pälli wrote: > that seems the case > > Acked-by: Tapani Pälli > > > On 06/04/2017 07:53 AM, Chih-Wei Huang wrote: >> >> The pthread_barrier_* functions were introduced to bionic >> since Nougat. >> ... and pushed. Thanks gents. Out of curiosity: Chih-Wei, did you notice any perf difference when using llvmpipe? -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: use bionic pthread_barrier_* if possible
2017-06-05 21:15 GMT+08:00 Emil Velikov : > On 5 June 2017 at 09:27, Tapani Pälli wrote: >> that seems the case >> >> Acked-by: Tapani Pälli >> >> On 06/04/2017 07:53 AM, Chih-Wei Huang wrote: >>> >>> The pthread_barrier_* functions were introduced to bionic >>> since Nougat. >>> > ... and pushed. Thanks gents. > > Out of curiosity: Chih-Wei, did you notice any perf difference when > using llvmpipe? Hmm... No. Should I expect that? I just expect code size reduced though it's very small. -- Chih-Wei Android-x86 project http://www.android-x86.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev