android: radeonsi: fix build after vl refactoring (v2)
authorMauro Rossi <issor.oruam@gmail.com>
Sat, 16 Nov 2019 17:39:31 +0000 (18:39 +0100)
committermaurossi <issor.oruam@gmail.com>
Thu, 5 Dec 2019 08:08:23 +0000 (08:08 +0000)
vl functions moved from radeonsi to gallium/auxiliary/vl have left
android build of radeonsi in broken state.

libmesa_galliumvl static is need to build readeonsi,
gallium_dri building rules are reworked to avoid multiple symbols
and libmesa_galliumvl static dependency is needed in radeonsi.

Here is the changelog:
- android: gallium/auxiliary: add libmesa_galliumvl static
- android: gallium_dri: move libmesa_gallium to static to prevent multiple symbols
- android: radeonsi: fix build after vl refactoring

Fixes the following building error:

external/mesa/src/gallium/drivers/radeonsi/si_uvd.c:47:
error: undefined reference to 'vl_video_buffer_create_as_resource'
clang.real: error: linker command failed with exit code 1 (use -v to see invocation)

Fixes: 86e60bc ("radeonsi: remove si_vid_join_surfaces and use combined planar allocations")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/Android.mk
src/gallium/drivers/radeonsi/Android.mk
src/gallium/targets/dri/Android.mk

index f73299637705e46fd6d8b6c3c2f0083aadc3fe32..7e8b2d31e168b44ca4079e508e991efb6d938b3a 100644 (file)
@@ -74,3 +74,14 @@ LOCAL_GENERATED_SOURCES += $(MESA_GEN_NIR_H)
 
 include $(GALLIUM_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
 
 include $(GALLIUM_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
+
+# Build libmesa_galliumvl used by radeonsi
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+       $(VL_SOURCES)
+
+LOCAL_MODULE := libmesa_galliumvl
+
+include $(GALLIUM_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
index 6f81f3f5346b16c251231e0b4e34c2225bccb920..f69b0d9219ed513a7330dc2b6092963607f1d719 100644 (file)
@@ -40,7 +40,9 @@ LOCAL_C_INCLUDES := \
        $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_amd_common,,)/common \
        $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir
 
        $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_amd_common,,)/common \
        $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir
 
-LOCAL_STATIC_LIBRARIES := libmesa_amd_common
+LOCAL_STATIC_LIBRARIES := \
+       libmesa_amd_common \
+       libmesa_galliumvl
 
 LOCAL_SHARED_LIBRARIES := libdrm_radeon
 LOCAL_MODULE := libmesa_pipe_radeonsi
 
 LOCAL_SHARED_LIBRARIES := libdrm_radeon
 LOCAL_MODULE := libmesa_pipe_radeonsi
index fa69b708c13385aa1481a37b1b79664f7adbcb30..c666312b77929426cd554783f2d610a08c049fa8 100644 (file)
@@ -57,6 +57,7 @@ endif
 LOCAL_STATIC_LIBRARIES += \
        libfreedreno_drm \
        libfreedreno_ir3 \
 LOCAL_STATIC_LIBRARIES += \
        libfreedreno_drm \
        libfreedreno_ir3 \
+       libmesa_gallium \
        libpanfrost_bifrost \
        libpanfrost_decode \
        libpanfrost_encoder \
        libpanfrost_bifrost \
        libpanfrost_decode \
        libpanfrost_encoder \
@@ -79,7 +80,6 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
        libmesa_nir \
        libmesa_dri_common \
        libmesa_megadriver_stub \
        libmesa_nir \
        libmesa_dri_common \
        libmesa_megadriver_stub \
-       libmesa_gallium \
        libmesa_pipe_loader \
        libmesa_util \
        libmesa_loader
        libmesa_pipe_loader \
        libmesa_util \
        libmesa_loader