summaryrefslogtreecommitdiff
path: root/android
Commit message (Collapse)AuthorAgeFilesLines
* meson/ci: promote virtio-experimental to virtioYiwei Zhang2023-05-031-1/+1
| | | | | Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22547>
* AOSP: Add intel_hasvk vulkan library suffixMauro Rossi2022-11-291-0/+1
| | | | | | | | | | | | | | | | | Required to correctly install vulkan.intel_hasvk.so module after commit 50013ca9 ("intel: add a hasvk vulkan driver") In order to set property ro.hardware.vulkan as 'intel_hasvk' for the correct iGPU parts at init stage, i915 'graphics version' can only be detected by means of /sys/kernel/debug/dri/0/i915_capabilities and debugfs needs to be mounted at early-init stage https://review.lineageos.org/c/LineageOS/android_device_lge_g3-common/+/19875 Cc: "22.3" mesa-stable Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Tapani Pälli <tapani.palli@intel.com> Tested-by: Mauro Rossi <issor.oruam@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20048>
* Android.mk: Fix gnu++14 related build failuresMauro Rossi2022-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch filters-out '-std=gnu++14' from the cflags obtained from AOSP/KATI dummy target output to avoid the following building errors: FAILED: src/gallium/drivers/r600/45f68e3@@r600@sta/sfn_sfn_assembler.cpp.o ... clang++ ... -std=c++17 ... -std=gnu++14 ... In file included from ../src/gallium/drivers/r600/sfn/sfn_assembler.cpp:27: In file included from ../src/gallium/drivers/r600/sfn/sfn_assembler.h:32: In file included from ../src/gallium/drivers/r600/sfn/sfn_shader.h:31: ../src/gallium/drivers/r600/sfn/sfn_instr.h:369:56: error: no template named 'is_base_of_v' in namespace 'std'; did you mean 'is_base_of'? template <typename T, typename = std::enable_if_t<std::is_base_of_v<Instr, T>>> ~~~~~^~~~~~~~~~~~ is_base_of /home/utente/pie-x86_kernel/external/libcxx/include/type_traits:1412:29: note: 'is_base_of' declared here struct _LIBCPP_TEMPLATE_VIS is_base_of ^ In file included from ../src/gallium/drivers/r600/sfn/sfn_assembler.cpp:27: In file included from ../src/gallium/drivers/r600/sfn/sfn_assembler.h:32: In file included from ../src/gallium/drivers/r600/sfn/sfn_shader.h:31: ../src/gallium/drivers/r600/sfn/sfn_instr.h:369:51: error: template argument for non-type template parameter must be an expression template <typename T, typename = std::enable_if_t<std::is_base_of_v<Instr, T>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/utente/pie-x86_kernel/external/libcxx/include/type_traits:439:16: note: template parameter is declared here template <bool _Bp, class _Tp = void> using enable_if_t = typename enable_if<_Bp, _Tp>::type; ^ 2 errors generated. Cc: "22.2" "22.3" mesa-stable Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19563>
* android: -Ddri-drivers= is not needed anymoreYonggang Luo2022-11-021-1/+0
| | | | | | Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19462>
* Android: Use libgbm_mesa name for SDK30+Roman Stratiienko2022-09-122-2/+8
| | | | | | | | | | | libgbm.so name has been occupied in AOSP by minigbm starting from Android-11 (SDKv30). In AOSP's mesa3d fork, libgbm was renamed to libgbm_mesa. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18533>
* Android.mk: Provide a custom entry name to ensure meson checks succeedAlessandro Astone2022-09-051-0/+1
| | | | | | | | | | | | | | | | | | | When meson tests for the compability of some linker flags, not having the default entry symbol "_start" defined makes the check fail for a warning unrelated to the linker flag meson is testing. Since these tests normally just try to compile a C program with a main, use "main" as the ficticious entry point. Specifically, this makes "-Wl,--build-id=sha1" recognised as valid and allows its use for drivers that rely on it. This is a temporary workaround that is required until Android.mk is changed to support both shared libraries and executables. Cc: "22.0" "22.1" "22.2" mesa-stable Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17715>
* Android.mk: Filter out --build-id=md5 linker flagAlessandro Astone2022-09-051-1/+2
| | | | | | | | To avoid conflicts with meson-generated --build-id linker option Cc: "22.0" "22.1" "22.2" mesa-stable Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17715>
* Android.mk: Disable lmsensorsAlessandro Astone2022-08-121-0/+1
| | | | | | | | | | Meson might incorrectly enable sensors if it detects lmsensors on the host system. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6805 Cc: "22.0" "22.1" "22.2" mesa-stable Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17391>
* Android.mk: Intermediate output paths may already be absoluteAlessandro Astone2022-06-261-18/+33
| | | | | | | | That is the case when OUT_DIR_COMMON_BASE is set. Only prefix paths with AOSP_ABSOLUTE_PATH if they're relative. Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16674>
* Android.mk: Generate the dummy source in local-generated-sources-dirAlessandro Astone2022-06-261-4/+5
| | | | | | | | A source file cannot be otherwise referenced by absolute path. That happens when OUT_DIR_COMMON_BASE is set. Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16674>
* Android.mk: Make mesa3d-lib work with absolute path meson outputsAlessandro Astone2022-06-261-6/+17
| | | | | | | | | | | | LOCAL_PREBUILT_MODULE_FILE is the only variable that allows specifying the absolute path to a prebuilt. That happens when OUT_DIR_COMMON_BASE is set. Since it does not have multilib variants, define two separate libraries for multilib Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16674>
* Android.mk: Cleanup mesa3d-libAlessandro Astone2022-06-261-8/+11
| | | | | | | | Properly cleanup variables before declaring a library. Explicitly require library dependencies. Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16674>
* Android.mk: Fix c11-related build failuresRoman Stratiienko2022-06-171-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | When building with Android.mk we are ending-up with: gcc ..... -std=gnu99 .... -std=c11 .... target.o ^^^^^^^^^^ ^^^^^^^^ | | _______________^_____ _____^___________ AOSP/KATI GENERATED MESON GENERATED Some compilers uses first -std=gnu99 option and ignores second, which results: c99 implicit declaration of function static_assert() This patch filters-out the first '-std=gnu99' from the cflags obtained from AOSP/KATI dummy target output to avoid such kind of errors. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Mauro Rossi <issor.oruam@gmail.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17078>
* gallium/swr: Remove common code and build optionsJan Zielinski2021-12-062-5/+2
| | | | | | | | This commit removes all OpenSWR references from common Mesa code and build system. Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>
* android: define cpp_rtti=false because libLLVM is built w/o RTTI (v2)Mauro Rossi2021-11-301-0/+1
| | | | | | | | | | | | | | | libLLVM for Android is built without RTTI, but after commit ad86267 mesa inherits meson default RTTI enabled state. cpp_rtti=false is added to meson options in android/mesa3d_cross.mk (v2) Add Fixes tag and use spaces instead of tabs for aligning the trailing \ Signed-off-by: Mauro Rossi <issor.oruam@gmail.com> Fixes: ad862674 ("meson: Don't override built-in cpp_rtti option, error if it's invalid") Cc: "21.3" "21.2" mesa-stable Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13901>
* Revert "android: define cpp_rtti=false because libLLVM is built w/o RTTI"Mauro Rossi2021-11-301-1/+0
| | | | | | | | | This reverts commit f659d00000a1a3667f9861d01d5828dd12ec6857. The revert is done because essential Fixes tag was missing and to apply a better version that could be picked for mesa-stable. Acked-by: Marijn Suijten <marijn.suijten@somainline.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13901>
* android.mk: Add missing variables to the make targetRoman Stratiienko2021-11-231-1/+5
| | | | | | | | | | | | | | | Android build system may use different internal variables to specify cflags/cppflags. Small change in product confguration may force Android to use diffrent set of variables, therefore we should keep all of them attached to the make rule's target. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5549 Fixes: 8621bd8d5e67 ("android: Add scripts to build using meson") Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Acked-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13914>
* android: define cpp_rtti=false because libLLVM is built w/o RTTIMauro Rossi2021-11-201-0/+1
| | | | | | | | | | | libLLVM for Android is built without RTTI, but after commit ad86267 mesa inherits meson default RTTI enabled state cpp_rtti=false is added to meson options in android/mesa3d_cross.mk Signed-off-by: Mauro Rossi <issor.oruam@gmail.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13888>
* android: Allow forcing softpipeJesse Natalie2021-11-191-0/+2
| | | | | | | | | | | | | | | | When dealing with swrast, there's two possibilities: If you have LLVM, you get llvmpipe, which is pretty fast. If you don't, you get softpipe, which is slow, but does have a couple nice qualities, like being smaller and not needing executable memory for JIT. If you're building a driver that requires LLVM like radeonsi then you need the LLVM stub for the build to find LLVM. But for swrast, since it can mean either softpipe/llvmpipe, you don't strictly need LLVM. So this just makes the Android build files flexible like the Meson build files (where you can specify -Dllvm=disabled even if LLVM is findable). Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13532>
* android,d3d12: Support using DirectX-Headers dependency from AOSPJesse Natalie2021-11-191-0/+6
| | | | | | | | | Note that the Android build system apparently lowercases stuff, so add a lowercase "directx-headers" dependency which is searched first, before falling back to the proper-cased "DirectX-Headers" dependency. Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13532>
* android: Add a BOARD CFlags option so build can be customizedJesse Natalie2021-11-191-0/+1
| | | | | Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13532>
* AOSP: Add panfrost vulkan library suffixRoman Stratiienko2021-08-161-0/+1
| | | | | Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12304>
* AOSP: Update timestamps of target binariesRoman Stratiienko2021-08-161-2/+4
| | | | | | | | | | | | Fixes warning during the build and unnecessary rule execution: *** ninja: Missing `restat`? An output file is older than the most recent input: *** Fixes: 8621bd8d5e67 ("android: Add scripts to build using meson") Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Tested-by: Mauro Rossi <issor.oruam@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12304>
* AOSP: Upgrade libLLVM dependency to v12Roman Stratiienko2021-08-161-2/+2
| | | | | | | | | | | | Now LLVMv12 seems to be stable enough, so we can upgrade to it. Version adapted for AOSP can be found here [1] [1]: https://github.com/maurossi/llvm-project/tree/release_12.x Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Tested-by: Mauro Rossi <issor.oruam@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12304>
* AOSP: Extract version from libdrm instead of hardcoding it.Roman Stratiienko2021-08-161-5/+7
| | | | | | | | | | mesa3d require up-to-date version of libdrm. Hardcoding it to 2.4.105 is wrong. Fixes: 8621bd8d5e67 ("android: Add scripts to build using meson") Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Tested-by: Mauro Rossi <issor.oruam@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12304>
* android: Restore android/Android.mkJason Ekstrand2021-07-091-0/+154
| | | | | | | | It was accidentally dropped as part of d4b482d378e3 but it's the one Android makefile we want to keep. Fixes: d4b482d378e3 "android: Drop the Android.mk build system" Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11798>
* android: Drop the Android.mk build systemJason Ekstrand2021-07-081-154/+0
| | | | | | | | | | | | | | | | | | | | | Android.mk files haven't really been supported by Mesa devs for a long time. Most of us have been willing to update Makefile.sources if we remember and sometimes we try to blind code some Android.mk for a new generator. However, the reality is that it breaks regularly and ends up being maintained by the Android community. To address this problem another approach was implemented in !10183 utilizing the maintained meson build system. The old Android.mk files are no longer required. This commit was created with the following commands: git rm **/Android.mk git rm **/Android.*.mk git rm **/Makefile.sources git rm CleanSpec.mk Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4487 Acked-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9728>
* AOSP: Do not add '-Wl,--gc-sections' to the linker argumentsRoman Stratiienko2021-07-071-2/+3
| | | | | | | | | | With '-Wl,--gc-sections' meson.build cc.has_function() will never fail, providing wrong input to the build system. Fixes: 8621bd8d5e67 ("android: Add scripts to build using meson") Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Tested-by: Mauro Rossi <issor.oruam@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11637>
* egl: android: add IMapper@4 metadata API buffer_info getterRoman Stratiienko2021-06-301-0/+10
| | | | | | | | | Starting from Android-11 Google introduces generalized API to access buffer information. This API is a part of IMapper@4 HAL. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6045>
* android: Add scripts to build using mesonRoman Stratiienko2021-06-072-0/+437
How to use: - For GALLIUM drivers: 1. Add gallium drivers into your board.mk file: board.mk: BOARD_MESA3D_USES_MESON_BUILD := true BOARD_MESA3D_GALLIUM_DRIVERS := lima panfrost v3d 2. Add the following packages into your device.mk file: device.mk: PRODUCT_PACKAGES += \ libEGL_mesa \ libGLESv1_CM_mesa \ libGLESv2_mesa \ libgallium_dri \ libglapi - For VULKAN drivers: 1. Add single vulkan driver into your board.mk file: board.mk: BOARD_MESA3D_USES_MESON_BUILD := true BOARD_MESA3D_VULKAN_DRIVERS := freedreno broadcom 2. Add the following package configuration into your device.mk file: device.mk: PRODUCT_PACKAGES += \ vulkan.freedreno PRODUCT_PROPERTY_OVERRIDES += \ ro.hardware.vulkan=freedreno - To build 'libgbm' set definition in the board.mk: BOARD_MESA3D_BUILD_LIBGBM := true And add a package to the device.mk: PRODUCT_PACKAGES += libgbm Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Tested-by: Mauro Rossi <issor.oruam@gmail.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10183>