From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.pengutronix.de.) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1isOQy-0004I7-TP for ptxdist@pengutronix.de; Fri, 17 Jan 2020 11:00:56 +0100 From: Philipp Zabel Date: Fri, 17 Jan 2020 11:00:51 +0100 Message-Id: <20200117100055.9110-3-p.zabel@pengutronix.de> In-Reply-To: <20200117100055.9110-1-p.zabel@pengutronix.de> References: <20200117100055.9110-1-p.zabel@pengutronix.de> MIME-Version: 1.0 Subject: [ptxdist] [PATCH v2 3/7] mesalib: enable vulkan drivers List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Radv still requires LLVM support. Signed-off-by: Philipp Zabel --- No changes since v1. --- rules/mesalib.in | 12 ++++++++++++ rules/mesalib.make | 19 +++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/rules/mesalib.in b/rules/mesalib.in index 7e200ee9ec23..2fa8156bab8e 100644 --- a/rules/mesalib.in +++ b/rules/mesalib.in @@ -178,5 +178,17 @@ config MESALIB_LMSENSORS depends on MESALIB_EXTENDED_HUD bool +comment "Vulkan drivers" + +config MESALIB_VULKAN_AMD + bool + # needs LLVM + depends on BROKEN + prompt "AMD (Radv)" + +config MESALIB_VULKAN_INTEL + bool + prompt "Intel (Anvil)" + endif diff --git a/rules/mesalib.make b/rules/mesalib.make index 35b71795dcc3..0fcdbbc0977e 100644 --- a/rules/mesalib.make +++ b/rules/mesalib.make @@ -66,6 +66,13 @@ MESALIB_DRI_LIBS-y = \ MESALIB_DRI_GALLIUM_LIBS-y = \ $(subst kmsro,imx-drm pl111 hx8357d stm,$(subst freedreno,kgsl,$(MESALIB_GALLIUM_DRIVERS-y))) +ifdef PTXCONF_ARCH_X86 +MESALIB_VULKAN_DRIVERS-$(PTXCONF_MESALIB_VULKAN_AMD) += amd +MESALIB_VULKAN_DRIVERS-$(PTXCONF_MESALIB_VULKAN_INTEL) += intel +endif + +MESALIB_VULKAN_LIBS-y = $(subst amd,radeon,$(MESALIB_VULKAN_DRIVERS-y)) + MESALIB_LIBS-y := libglapi MESALIB_LIBS-$(PTXCONF_MESALIB_GLX) += libGL MESALIB_LIBS-$(PTXCONF_MESALIB_GLES1) += libGLESv1_CM @@ -120,7 +127,7 @@ MESALIB_CONF_OPT := \ -Dplatforms=$(subst $(space),$(comma),$(MESALIBS_EGL_PLATFORMS-y)) \ -Dpower8=false \ -Dselinux=false \ - -Dshader-cache=false \ + -Dshader-cache=$(call ptx/truefalse, PTXCONF_MESALIB_VULKAN_AMD) \ -Dshared-glapi=true \ -Dshared-llvm=false \ -Dswr-arches=[] \ @@ -128,7 +135,7 @@ MESALIB_CONF_OPT := \ -Dva-libs-path=/usr/lib/dri \ -Dvalgrind=false \ -Dvdpau-libs-path=/usr/lib/vdpau \ - -Dvulkan-drivers=[] \ + -Dvulkan-drivers=$(subst $(space),$(comma),$(MESALIB_VULKAN_DRIVERS-y)) \ -Dvulkan-icd-dir=/etc/vulkan/icd.d \ -Dvulkan-overlay-layer=false \ -Dxlib-lease=false \ @@ -171,6 +178,14 @@ ifneq ($(strip $(MESALIB_DRI_GALLIUM_LIBS-y)),) /usr/lib/dri/$(lib)_dri.so)$(ptx/nl)) endif +ifneq ($(strip $(MESALIB_VULKAN_LIBS-y)),) + @$(foreach lib, $(MESALIB_VULKAN_LIBS-y), \ + $(call install_copy, mesalib, 0, 0, 0644, -, \ + /usr/lib/libvulkan_$(lib).so)$(ptx/nl) \ + $(call install_copy, mesalib, 0, 0, 0644, -, \ + /etc/vulkan/icd.d/$(lib)_icd.$(subst _,-,$(PTXCONF_ARCH_STRING)).json)$(ptx/nl)) +endif + @$(foreach lib, $(MESALIB_LIBS-y), \ $(call install_lib, mesalib, 0, 0, 0644, $(lib))$(ptx/nl)) -- 2.20.1 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de