diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-09-02 05:18:14 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-09-02 05:18:14 +0000 |
commit | 5f66494d31f735486b8222ecfa0a0c9046e92543 (patch) | |
tree | f699ac8d7f6d510c30bded04f96a1209344f6a47 /lib/mesa/android | |
parent | 17a5b543e3479aaa779cc68345c46d437edd05d8 (diff) |
Import Mesa 22.1.7
Diffstat (limited to 'lib/mesa/android')
-rw-r--r-- | lib/mesa/android/Android.mk | 13 | ||||
-rw-r--r-- | lib/mesa/android/mesa3d_cross.mk | 17 |
2 files changed, 16 insertions, 14 deletions
diff --git a/lib/mesa/android/Android.mk b/lib/mesa/android/Android.mk index e4e1d3aa5..430b01a26 100644 --- a/lib/mesa/android/Android.mk +++ b/lib/mesa/android/Android.mk @@ -42,10 +42,13 @@ LOCAL_SHARED_LIBRARIES := libc libdl libdrm libm liblog libcutils libz libc++ li LOCAL_STATIC_LIBRARIES := libexpat libarect libelf LOCAL_HEADER_LIBRARIES := libnativebase_headers hwvulkan_headers libbacktrace_headers MESON_GEN_PKGCONFIGS := backtrace cutils expat hardware libdrm:$(LIBDRM_VERSION) nativewindow sync zlib:1.2.11 libelf +LOCAL_CFLAGS += $(BOARD_MESA3D_CFLAGS) -ifneq ($(filter swr swrast,$(BOARD_MESA3D_GALLIUM_DRIVERS) $(BOARD_MESA3D_VULKAN_DRIVERS)),) +ifneq ($(filter swrast,$(BOARD_MESA3D_GALLIUM_DRIVERS) $(BOARD_MESA3D_VULKAN_DRIVERS)),) +ifeq ($(BOARD_MESA3D_FORCE_SOFTPIPE),) MESON_GEN_LLVM_STUB := true endif +endif ifneq ($(filter zink,$(BOARD_MESA3D_GALLIUM_DRIVERS)),) LOCAL_SHARED_LIBRARIES += libvulkan @@ -74,10 +77,14 @@ LOCAL_SHARED_LIBRARIES += libdrm_nouveau MESON_GEN_PKGCONFIGS += libdrm_nouveau:$(LIBDRM_VERSION) endif +ifneq ($(filter d3d12,$(BOARD_MESA3D_GALLIUM_DRIVERS)),) +LOCAL_HEADER_LIBRARIES += DirectX-Headers +LOCAL_STATIC_LIBRARIES += DirectX-Guids +MESON_GEN_PKGCONFIGS += DirectX-Headers +endif + ifneq ($(MESON_GEN_LLVM_STUB),) MESON_LLVM_VERSION := 12.0.0 -# Required for swr gallium target -MESON_LLVM_IRBUILDER_PATH := external/llvm-project/llvm/include/llvm/IR/IRBuilder.h LOCAL_SHARED_LIBRARIES += libLLVM12 endif diff --git a/lib/mesa/android/mesa3d_cross.mk b/lib/mesa/android/mesa3d_cross.mk index 9af57fe78..b3cc09496 100644 --- a/lib/mesa/android/mesa3d_cross.mk +++ b/lib/mesa/android/mesa3d_cross.mk @@ -88,7 +88,7 @@ MESON_GEN_NINJA := \ -Ddri-search-path=/vendor/$(MESA3D_LIB_DIR)/dri \ -Dplatforms=android \ -Dplatform-sdk-version=$(PLATFORM_SDK_VERSION) \ - -Ddri-drivers=$(subst $(space),$(comma),$(BOARD_MESA3D_CLASSIC_DRIVERS)) \ + -Ddri-drivers= \ -Dgallium-drivers=$(subst $(space),$(comma),$(BOARD_MESA3D_GALLIUM_DRIVERS)) \ -Dvulkan-drivers=$(subst $(space),$(comma),$(subst radeon,amd,$(BOARD_MESA3D_VULKAN_DRIVERS))) \ -Dgbm=enabled \ @@ -257,8 +257,7 @@ ifneq ($(MESON_GEN_LLVM_STUB),) mkdir -p $(dir $@)/subprojects/llvm/ echo -e "project('llvm', 'cpp', version : '$(MESON_LLVM_VERSION)')\n" \ "dep_llvm = declare_dependency()\n" \ - "has_rtti = false\n" \ - "irbuilder_h = files('$(AOSP_ABSOLUTE_PATH)/$(MESON_LLVM_IRBUILDER_PATH)')" > $(dir $@)/subprojects/llvm/meson.build + "has_rtti = false\n" > $(dir $@)/subprojects/llvm/meson.build endif $(MESON_GEN_NINJA) $(MESON_BUILD) @@ -289,17 +288,13 @@ endef $(foreach driver,$(BOARD_MESA3D_VULKAN_DRIVERS), $(eval $(call vulkan_target,$(driver)))) -$($(M_TARGET_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES)/dri/.targets.timestamp: MESA3D_GALLIUM_DRI_DIR:=$(MESA3D_GALLIUM_DRI_DIR) -$($(M_TARGET_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES)/dri/.targets.timestamp: $(MESON_OUT_DIR)/install/.install.timestamp +$($(M_TARGET_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES)/dri/.symlinks.timestamp: MESA3D_GALLIUM_DRI_DIR:=$(MESA3D_GALLIUM_DRI_DIR) +$($(M_TARGET_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES)/dri/.symlinks.timestamp: $(MESON_OUT_DIR)/install/.install.timestamp + # Create Symlinks mkdir -p $(dir $@) - # Create Symlinks for gallium and kmsro drivers ls -1 $(MESA3D_GALLIUM_DRI_DIR)/ | PATH=/usr/bin:$$PATH xargs -I{} ln -s -f libgallium_dri.so $(dir $@)/{} - # Remove unwanted Symlinks created for classic dri drivers - $(foreach d,$(BOARD_MESA3D_CLASSIC_DRIVERS), rm $(dir $@)/$(d)_dri.so;) - # Copy classic dri drivers - $(foreach d,$(BOARD_MESA3D_CLASSIC_DRIVERS), cp $(MESA3D_GALLIUM_DRI_DIR)/$(d)_dri.so $(dir $@)/$(d)_dri.so;) touch $@ -$($(M_TARGET_PREFIX)MESA3D_GALLIUM_DRI_BIN): $(TARGET_OUT_VENDOR)/$(MESA3D_LIB_DIR)/dri/.targets.timestamp +$($(M_TARGET_PREFIX)MESA3D_GALLIUM_DRI_BIN): $(TARGET_OUT_VENDOR)/$(MESA3D_LIB_DIR)/dri/.symlinks.timestamp echo "Build $@" touch $@ |