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

Submitted by Mauro Rossi on Feb. 8, 2018, 12:21 a.m.

Details

Message ID CAEQFVGZnju4-wrVaZac8qW3CadBf-VS_rH=gtfgikd==hw9Fsw@mail.gmail.com
State New
Headers show
Series "Series without cover letter" ( rev: 2 ) in Mesa

Not browsing as part of any series.

Commit Message

Mauro Rossi Feb. 8, 2018, 12:21 a.m.
> 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.

Hi, I'm sending the updated [PATCH 2/3]

From 3960954f7037cd4dc248fe7f5b5b932d1d662a14 Mon Sep 17 00:00:00 2001
From: Mauro Rossi <issor.oruam@gmail.com>
Date: Mon, 5 Feb 2018 22:15:52 +0100
Subject: [PATCH] android: anv: add dependency on libnativewindow for O and
 later

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.
---
 src/intel/Android.vulkan.mk | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

 #
@@ -100,7 +106,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES)

 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml

-LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)

 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
@@ -120,7 +126,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES)

 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml

-LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)

 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
@@ -140,7 +146,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES)

 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml

-LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)

 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
@@ -160,7 +166,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES)

 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml

-LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)

 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
@@ -180,7 +186,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES)

 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml

-LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)

 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
@@ -236,7 +242,7 @@ $(intermediates)/vulkan/anv_extensions.h:
  --xml $(MESA_TOP)/src/vulkan/registry/vk_android_native_buffer.xml \
  --out-h $@

-LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)

 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
@@ -283,7 +289,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
  libmesa_intel_compiler \
  libmesa_anv_entrypoints

-LOCAL_SHARED_LIBRARIES := libdrm libz libsync liblog
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) libz libsync liblog

 include $(MESA_COMMON_MK)
 include $(BUILD_SHARED_LIBRARY)

Patch hide | download patch | download mbox

From 3960954f7037cd4dc248fe7f5b5b932d1d662a14 Mon Sep 17 00:00:00 2001
From: Mauro Rossi <issor.oruam@gmail.com>
Date: Mon, 5 Feb 2018 22:15:52 +0100
Subject: [PATCH] android: anv: add dependency on libnativewindow for O and
 later

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.
---
 src/intel/Android.vulkan.mk | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk
index 5c8c947136..dfc78e5289 100644
--- a/src/intel/Android.vulkan.mk
+++ b/src/intel/Android.vulkan.mk
@@ -85,6 +85,12 @@  ANV_INCLUDES := \
 	$(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_vulkan_common,,)/vulkan \
 	$(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_vulkan_util,,)/util
 
+ANV_SHARED_LIBRARIES := libdrm
+
+ifeq ($(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5 6 7),)
+ANV_SHARED_LIBRARIES += libnativewindow
+endif
+
 #
 # libanv for gen7
 #
@@ -100,7 +106,7 @@  LOCAL_C_INCLUDES := $(ANV_INCLUDES)
 
 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
 
-LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
 
 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
@@ -120,7 +126,7 @@  LOCAL_C_INCLUDES := $(ANV_INCLUDES)
 
 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
 
-LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
 
 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
@@ -140,7 +146,7 @@  LOCAL_C_INCLUDES := $(ANV_INCLUDES)
 
 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
 
-LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
 
 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
@@ -160,7 +166,7 @@  LOCAL_C_INCLUDES := $(ANV_INCLUDES)
 
 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
 
-LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
 
 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
@@ -180,7 +186,7 @@  LOCAL_C_INCLUDES := $(ANV_INCLUDES)
 
 LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
 
-LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
 
 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
@@ -236,7 +242,7 @@  $(intermediates)/vulkan/anv_extensions.h:
 		--xml $(MESA_TOP)/src/vulkan/registry/vk_android_native_buffer.xml \
 		--out-h $@
 
-LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
 
 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
@@ -283,7 +289,7 @@  LOCAL_WHOLE_STATIC_LIBRARIES := \
 	libmesa_intel_compiler \
 	libmesa_anv_entrypoints
 
-LOCAL_SHARED_LIBRARIES := libdrm libz libsync liblog
+LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) libz libsync liblog
 
 include $(MESA_COMMON_MK)
 include $(BUILD_SHARED_LIBRARY)
-- 
2.14.1


Comments

Thanks Mauro!

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>

On 02/08/2018 02:21 AM, Mauro Rossi wrote:
>> 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.
> 
> Hi, I'm sending the updated [PATCH 2/3]
> 
>  From 3960954f7037cd4dc248fe7f5b5b932d1d662a14 Mon Sep 17 00:00:00 2001
> From: Mauro Rossi <issor.oruam@gmail.com>
> Date: Mon, 5 Feb 2018 22:15:52 +0100
> Subject: [PATCH] android: anv: add dependency on libnativewindow for O and
>   later
> 
> 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.
> ---
>   src/intel/Android.vulkan.mk | 20 +++++++++++++-------
>   1 file changed, 13 insertions(+), 7 deletions(-)
> 
> diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk
> index 5c8c947136..dfc78e5289 100644
> --- a/src/intel/Android.vulkan.mk
> +++ b/src/intel/Android.vulkan.mk
> @@ -85,6 +85,12 @@ ANV_INCLUDES := \
>    $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_vulkan_common,,)/vulkan
> \
>    $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_vulkan_util,,)/util
> 
> +ANV_SHARED_LIBRARIES := libdrm
> +
> +ifeq ($(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5 6 7),)
> +ANV_SHARED_LIBRARIES += libnativewindow
> +endif
> +
>   #
>   # libanv for gen7
>   #
> @@ -100,7 +106,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES)
> 
>   LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
> 
> -LOCAL_SHARED_LIBRARIES := libdrm
> +LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
> 
>   include $(MESA_COMMON_MK)
>   include $(BUILD_STATIC_LIBRARY)
> @@ -120,7 +126,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES)
> 
>   LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
> 
> -LOCAL_SHARED_LIBRARIES := libdrm
> +LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
> 
>   include $(MESA_COMMON_MK)
>   include $(BUILD_STATIC_LIBRARY)
> @@ -140,7 +146,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES)
> 
>   LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
> 
> -LOCAL_SHARED_LIBRARIES := libdrm
> +LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
> 
>   include $(MESA_COMMON_MK)
>   include $(BUILD_STATIC_LIBRARY)
> @@ -160,7 +166,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES)
> 
>   LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
> 
> -LOCAL_SHARED_LIBRARIES := libdrm
> +LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
> 
>   include $(MESA_COMMON_MK)
>   include $(BUILD_STATIC_LIBRARY)
> @@ -180,7 +186,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES)
> 
>   LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml
> 
> -LOCAL_SHARED_LIBRARIES := libdrm
> +LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
> 
>   include $(MESA_COMMON_MK)
>   include $(BUILD_STATIC_LIBRARY)
> @@ -236,7 +242,7 @@ $(intermediates)/vulkan/anv_extensions.h:
>    --xml $(MESA_TOP)/src/vulkan/registry/vk_android_native_buffer.xml \
>    --out-h $@
> 
> -LOCAL_SHARED_LIBRARIES := libdrm
> +LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
> 
>   include $(MESA_COMMON_MK)
>   include $(BUILD_STATIC_LIBRARY)
> @@ -283,7 +289,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
>    libmesa_intel_compiler \
>    libmesa_anv_entrypoints
> 
> -LOCAL_SHARED_LIBRARIES := libdrm libz libsync liblog
> +LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) libz libsync liblog
> 
>   include $(MESA_COMMON_MK)
>   include $(BUILD_SHARED_LIBRARY)
>