Commit Graph

45 Commits

Author SHA1 Message Date
C Stout
67aadd4f0b meson: add log dependency to dep_android
Log library entrypoints are included with android-stub=true.

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30345>
2024-10-18 21:17:30 +00:00
Mauro Rossi
15bea329d7 android: gbm: split the DRI backend into separate library
Changes required after commit 514df444e

dri_gbm module is installed as /vendor/lib{64}/dri_gbm.so
to avoid changes in system/linkerconfig AOSP project

gbm-backends-path option is set as /vendor/$(MESA3D_LIB_DIR)

MESA3D_GBM_BINS variable simplifies dependencies declarations

Test results: gbm_gralloc works again

Fixes: 514df444e ("gbm: split the DRI backend into a separate library and unify backend handling")
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-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/31428>
2024-09-30 13:56:19 +02:00
Antonio Ospite
cebaa64ee3 android: fix build by removing references to dri-search-path
In commit 41e83b243c (meson: remove dri-search-path, 2024-09-18) the
`dri-search-path` meson option was removed but its usage in the Android
build files was left there, resulting in the following error when
building for Android:

-----------------------------------------------------------------------
FAILED: out/target/product/vsoc_x86_64/obj_x86/MESON_MESA3D/.build.timestamp
...

meson.build:4:0: ERROR: Unknown options: "dri-search-path"
-----------------------------------------------------------------------

Remove the usage of the option when building for Android, and while at
it remove also any mention of if in docs/drivers/llvmpipe.rst

Remove also the MESA3D_LIB_DIR variable which was used only for
dri-search-path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31266>
2024-09-19 23:42:13 +00:00
Valentine Burley
71a45e4e0f android: Extract version from llvm-project instead of hardcoding it
Stop hardcoding LLVM version as 12, instead read it from external/llvm-project.

In 81e20472a0
the location of the LLVM_VERSION_MAJOR definition was moved. This patch accounts for that
by extracting the version from the new location if it exists. If the new file is not present,
it falls back to the old location.

Backport-to: 24.2
Tested-by: Antonio Ospite <antonio.ospite@collabora.com>
Tested-by: Alessandro Astone <alessandro.astone@canonical.com>
Reviewed-by: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30598>
2024-08-17 21:11:08 +00:00
Antonio Ospite
2d2bc5b307 android: simplify building libgallium_dri on Android
The versioned libgallium library can be confusing on Android, and it is
probably not even needed there, so simplify the build on Android by
always build the unversioned `libgallium_dri.so` overriding the
`-Dunversion-libgallium=true` option added in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30579

Remove also all the bits that deal with the versioned library which are
not needed anymore.

Fixes: 9568976c52 ("android: fix build in multiple ways")
Acked-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30641>
2024-08-14 09:11:44 +00:00
Eric Engestrom
9568976c52 android: fix build in multiple ways
Includes the libgallium versioning, the megadriver hardlink -> symlink
change, and some fixes for things like abusing ls output.

backport-to: 24.2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30470>
2024-08-07 18:07:09 +00:00
Karol Herbst
821f4c8d99 nouveau: import libdrm_nouveau
Most of the code is copied as is, but there are a couple of changes:
- drop pre nvif code
- nouveau_list -> list_head
- pthread_mutex_t -> simple_mtx_t
- nvif_unwrap removed
- no assignments in if statements
- nouveau_object_mthd -> nouveau_device_info
- reworked object allocation UAPI calls

Most of the reworked code was copied from NVK or a previous version of it

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:07 +00:00
Joshua Ashton
735fe243a7 android: Use system = 'android' in crossfile
Fixes the following libarchive error when building with the libarchive wrap subproject:

In file included from ../subprojects/libarchive-3.7.2/libarchive/archive_write_open_memory.c:33:
../subprojects/libarchive-3.7.2/libarchive/archive.h:101:10: fatal error: 'android_lf.h' file not found

This also removes the version suffixes from the .so's that are referenced
in the mesa3d_cross.mk file as those are not present on the Android target.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27648>
2024-02-19 08:42:26 +00:00
Chris Spencer
257ecaca88 android.mk: Add option to pass arbitrary parameters to meson
Signed-off-by: Chris Spencer <spencercw@gmail.com>
Acked-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25101>
2023-12-13 20:09:37 +00:00
Mauro Rossi
05fb6b9c7d Android.mk: be able to build radeonsi without llvm
Android.mk rules for radeonsi are updated according to commit
0a56417 "meson: be able to build radeonsi without llvm"

cflag -DFORCE_BUILD_AMDGPU is required when building radeonsi with llvm support
based on android-x86 downstream LLVM fork that follows the AOSP llvm build rules.

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26049>
2023-11-10 01:28:16 +01:00
Mauro Rossi
95ad0c750c Android.mk: disable android-libbacktrace to build with Android 14
Android libbacktrace is not available in Android 14

Fixes the following build error:

FAILED: src/util/libmesa_util.a.p/u_debug_stack_android.cpp.o
...
../src/util/u_debug_stack_android.cpp:28:10: fatal error: 'backtrace/Backtrace.h' file not found
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Cc: mesa-stable
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25963>
2023-11-04 21:37:24 +01:00
Mauro Rossi
520e79a3b5 Android.mk: filter out cflags to build with Android 14 bundled clang
Android 14 uses prebuild clang version 17.0.2
By filtering these cflags there are no building errors on previous Android releases.

Fixes the following building errors:

../src/c11/time.h:54:8: error: redefinition of 'timespec'
struct timespec
       ^
/media/bigblissdrive/u-x86/out/soong/.intermediates/bionic/libc/libc/android_vendor.34_x86_x86_64_shared/gen/include/bits/timespec.h:46:8: note: previous definition is here
struct timespec {
       ^
1 error generated.

In file included from ../src/util/disk_cache.c:50:
../src/util/disk_cache.h:86:4: error: use of undeclared identifier 'Dl_info'
   Dl_info info;
   ^
...
./src/util/disk_cache.h:114:30: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *' [-Wint-conversion]
      _mesa_sha1_update(ctx, build_id_data(note), build_id_length(note));
                             ^~~~~~~~~~~~~~~~~~~

10 errors generated.

../src/intel/perf/intel_perf.c:91:10: error: call to undeclared function 'major'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   maj = major(sb.st_rdev);
         ^
../src/intel/perf/intel_perf.c:92:10: error: call to undeclared function 'minor'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   min = minor(sb.st_rdev);
         ^
2 errors generated.

../src/intel/vulkan/anv_allocator.c:295:13: error: call to undeclared function 'futex_wake'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
            futex_wake(&table->state.end, INT_MAX);
            ^
...
../src/intel/vulkan/anv_allocator.c:711:7: error: call to undeclared function 'futex_wait'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      futex_wait(&pool->block.end, block.end, NULL);
      ^
6 errors generated.

Cc: mesa-stable
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25963>
2023-11-04 21:36:55 +01:00
Samuel Holland
497aecb210 Android.mk: Only link LLVM for radeonsi, not amd_vk
When building for Android, avoid the LLVM dependency if possible.

Cc: mesa-stable
Acked-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: Idda03f954b4b5326e23a848e541411b60fcef063
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24007>
2023-09-15 18:43:02 +00:00
Samuel Holland
ec32619cb0 Android.mk: Explicitly enable/disable LLVM support
The AMD Vulkan driver uses LLVM by default, but it is possible to build
the driver without the LLVM dependency. In this case, we must explicitly
disable LLVM support, or else meson will die after failing to find LLVM.

The Android build system already knows when to link libLLVM, so forward
that information to meson.

Cc: mesa-stable
Acked-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: I7489d3811625b390aaaf2e84e666b4a8d98328b0
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24007>
2023-09-15 18:43:02 +00:00
Samuel Holland
599f47f11c Android.mk: Allow building only Vulkan drivers
Android bundles ANGLE for implementing OpenGL ES and EGL on top of
Vulkan. When using ANGLE, mesa is only needed for its Vulkan drivers.

Cc: mesa-stable
Acked-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: I034a0af52f9216bc5f1322f584bc591c90222327
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24007>
2023-09-15 18:43:02 +00:00
Yiwei Zhang
7d76038712 meson/ci: promote virtio-experimental to virtio
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22547>
2023-05-03 22:42:30 +00:00
Mauro Rossi
ea10b0fc7a AOSP: Add intel_hasvk vulkan library suffix
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>
2022-11-29 09:05:17 +01:00
Mauro Rossi
fd8ec189e5 Android.mk: Fix gnu++14 related build failures
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>
2022-11-07 17:46:42 +00:00
Yonggang Luo
5ae744c598 android: -Ddri-drivers= is not needed anymore
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>
2022-11-02 11:40:36 +00:00
Roman Stratiienko
62ef714ce4 Android: Use libgbm_mesa name for SDK30+
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>
2022-09-12 07:37:27 +00:00
Alessandro Astone
a68e2b810c Android.mk: Provide a custom entry name to ensure meson checks succeed
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>
2022-09-05 22:10:07 +00:00
Alessandro Astone
554b19b616 Android.mk: Filter out --build-id=md5 linker flag
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>
2022-09-05 22:10:07 +00:00
Alessandro Astone
c69ba3159a Android.mk: Disable lmsensors
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>
2022-08-12 08:51:11 +00:00
Alessandro Astone
a7d6365f20 Android.mk: Intermediate output paths may already be absolute
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>
2022-06-26 22:06:36 +00:00
Alessandro Astone
5feb025086 Android.mk: Generate the dummy source in local-generated-sources-dir
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>
2022-06-26 22:06:36 +00:00
Alessandro Astone
b0a1a28d97 Android.mk: Make mesa3d-lib work with absolute path meson outputs
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>
2022-06-26 22:06:36 +00:00
Alessandro Astone
46d4a0f8b2 Android.mk: Cleanup mesa3d-lib
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>
2022-06-26 22:06:36 +00:00
Roman Stratiienko
45267d5181 Android.mk: Fix c11-related build failures
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>
2022-06-17 12:28:46 +00:00
Jan Zielinski
e2de00876a gallium/swr: Remove common code and build options
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>
2021-12-06 23:37:50 +00:00
Mauro Rossi
1ba231fb75 android: define cpp_rtti=false because libLLVM is built w/o RTTI (v2)
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>
2021-11-30 22:58:30 +01:00
Mauro Rossi
be7a0b23c8 Revert "android: define cpp_rtti=false because libLLVM is built w/o RTTI"
This reverts commit f659d00000.
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>
2021-11-30 22:58:23 +01:00
Roman Stratiienko
32ec0fffa6 android.mk: Add missing variables to the make target
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: 8621bd8d5e ("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>
2021-11-23 21:06:09 +00:00
Mauro Rossi
f659d00000 android: define cpp_rtti=false because libLLVM is built w/o RTTI
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>
2021-11-20 02:25:12 +01:00
Jesse Natalie
d0bc4974fa android: Allow forcing softpipe
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>
2021-11-19 21:21:35 +00:00
Jesse Natalie
33e5a4378e android,d3d12: Support using DirectX-Headers dependency from AOSP
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>
2021-11-19 21:21:35 +00:00
Jesse Natalie
9e82a56745 android: Add a BOARD CFlags option so build can be customized
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13532>
2021-11-19 21:21:35 +00:00
Roman Stratiienko
86196eff98 AOSP: Add panfrost vulkan library suffix
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12304>
2021-08-16 09:18:46 +00:00
Roman Stratiienko
21de785562 AOSP: Update timestamps of target binaries
Fixes warning during the build and unnecessary rule execution:
***
ninja: Missing `restat`? An output file is older than the most recent input:
***

Fixes: 8621bd8d5e ("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>
2021-08-16 09:18:46 +00:00
Roman Stratiienko
c3775ac507 AOSP: Upgrade libLLVM dependency to v12
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>
2021-08-16 09:18:46 +00:00
Roman Stratiienko
a70ff21efb AOSP: Extract version from libdrm instead of hardcoding it.
mesa3d require up-to-date version of libdrm.
Hardcoding it to 2.4.105 is wrong.

Fixes: 8621bd8d5e ("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>
2021-08-16 09:18:46 +00:00
Jason Ekstrand
439322ad4c android: Restore android/Android.mk
It was accidentally dropped as part of d4b482d378 but it's the one
Android makefile we want to keep.

Fixes: d4b482d378 "android: Drop the Android.mk build system"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11798>
2021-07-09 13:54:45 +00:00
Jason Ekstrand
d4b482d378 android: Drop the Android.mk build system
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>
2021-07-08 14:44:02 -05:00
Roman Stratiienko
80f42e1d15 AOSP: Do not add '-Wl,--gc-sections' to the linker arguments
With '-Wl,--gc-sections' meson.build cc.has_function() will never fail,
providing wrong input to the build system.

Fixes: 8621bd8d5e ("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>
2021-07-07 18:32:28 +00:00
Roman Stratiienko
f85d3113b2 egl: android: add IMapper@4 metadata API buffer_info getter
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>
2021-06-30 16:50:44 +00:00
Roman Stratiienko
8621bd8d5e android: Add scripts to build using meson
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>
2021-06-07 16:04:15 +00:00