[Mesa-stable] [PATCH 2/3] android: anv: add dependency on libnativewindow for O and later

Tapani Pälli tapani.palli at intel.com
Mon Feb 5 08:09:58 UTC 2018


Hi;

On 02/04/2018 11:57 PM, Mauro Rossi wrote:
> Similar to 90dd6e5 ("Android: egl: add dependency on libnativewindow")
> 
> Fixes the following building errors:
> 
> In file included from external/mesa/src/intel/vulkan/gen7_cmd_buffer.c:30:
> In file included from external/mesa/src/intel/vulkan/anv_private.h:72:
> external/mesa/include/vulkan/vk_android_native_buffer.h:22:10: fatal error: 'system/window.h' file not found
>           ^~~~~~~~~~~~~~~~~
> 1 error generated.
> ...
> In file included from external/mesa/src/intel/vulkan/anv_gem.c:32:
> In file included from external/mesa/src/intel/vulkan/anv_private.h:72:
> external/mesa/include/vulkan/vk_android_native_buffer.h:22:10: fatal error: 'system/window.h' file not found
>           ^~~~~~~~~~~~~~~~~
> 1 error generated.
> 
> Cc: "18.0" <mesa-stable at lists.freedesktop.org>
> ---
>   src/intel/Android.vulkan.mk | 28 ++++++++++++++++++++++++++++
>   1 file changed, 28 insertions(+)
> 
> diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk
> index 5c8c947136..3a6870097b 100644
> --- a/src/intel/Android.vulkan.mk
> +++ b/src/intel/Android.vulkan.mk
> @@ -102,6 +102,10 @@ LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
>   
>   LOCAL_SHARED_LIBRARIES := libdrm
>   
> +ifeq ($(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5 6 7),)
> +LOCAL_SHARED_LIBRARIES += libnativewindow
> +endif
> +

How about introducing ANV_LIBRARIES (near to ANV_INCLUDES) and setting 
libdrm and libnativewindow there, then for each libanv just have the 
$(ANV_LIBRARIES)?

IMO this would make it cleaner to add new libs like we do here. In 
Android-IA we've just had the libnativewindow include path (since that 
is enough) but this is more cleaner way.


>   include $(MESA_COMMON_MK)
>   include $(BUILD_STATIC_LIBRARY)
>   
> @@ -122,6 +126,10 @@ LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
>   
>   LOCAL_SHARED_LIBRARIES := libdrm
>   
> +ifeq ($(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5 6 7),)
> +LOCAL_SHARED_LIBRARIES += libnativewindow
> +endif
> +
>   include $(MESA_COMMON_MK)
>   include $(BUILD_STATIC_LIBRARY)
>   
> @@ -142,6 +150,10 @@ LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
>   
>   LOCAL_SHARED_LIBRARIES := libdrm
>   
> +ifeq ($(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5 6 7),)
> +LOCAL_SHARED_LIBRARIES += libnativewindow
> +endif
> +
>   include $(MESA_COMMON_MK)
>   include $(BUILD_STATIC_LIBRARY)
>   
> @@ -162,6 +174,10 @@ LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
>   
>   LOCAL_SHARED_LIBRARIES := libdrm
>   
> +ifeq ($(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5 6 7),)
> +LOCAL_SHARED_LIBRARIES += libnativewindow
> +endif
> +
>   include $(MESA_COMMON_MK)
>   include $(BUILD_STATIC_LIBRARY)
>   
> @@ -182,6 +198,10 @@ LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
>   
>   LOCAL_SHARED_LIBRARIES := libdrm
>   
> +ifeq ($(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5 6 7),)
> +LOCAL_SHARED_LIBRARIES += libnativewindow
> +endif
> +
>   include $(MESA_COMMON_MK)
>   include $(BUILD_STATIC_LIBRARY)
>   
> @@ -238,6 +258,10 @@ $(intermediates)/vulkan/anv_extensions.h:
>   
>   LOCAL_SHARED_LIBRARIES := libdrm
>   
> +ifeq ($(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5 6 7),)
> +LOCAL_SHARED_LIBRARIES += libnativewindow
> +endif
> +
>   include $(MESA_COMMON_MK)
>   include $(BUILD_STATIC_LIBRARY)
>   
> @@ -285,5 +309,9 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
>   
>   LOCAL_SHARED_LIBRARIES := libdrm libz libsync liblog
>   
> +ifeq ($(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5 6 7),)
> +LOCAL_SHARED_LIBRARIES += libnativewindow
> +endif
> +
>   include $(MESA_COMMON_MK)
>   include $(BUILD_SHARED_LIBRARY)
> 


More information about the mesa-stable mailing list