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>
This commit is contained in:
Jesse Natalie 2021-08-04 17:55:58 -07:00 committed by Marge Bot
parent 6138b047e2
commit 33e5a4378e
2 changed files with 12 additions and 3 deletions

View File

@ -75,6 +75,12 @@ 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

View File

@ -648,9 +648,12 @@ endif
dep_dxheaders = null_dep
if with_gallium_d3d12 or with_microsoft_clc
dep_dxheaders = dependency('DirectX-Headers', fallback : ['DirectX-Headers', 'dep_dxheaders'],
required : with_gallium_d3d12
)
dep_dxheaders = dependency('directx-headers', required : false)
if not dep_dxheaders.found()
dep_dxheaders = dependency('DirectX-Headers', fallback : ['DirectX-Headers', 'dep_dxheaders'],
required : with_gallium_d3d12
)
endif
endif
if with_vulkan_overlay_layer or with_aco_tests