Skip to contentSkip to conversation

mesa: simplify overriding GALLIUMDRIVERS_LLVM

PATCH New Dmitry Baryshkov 1 participant 2 messages Jul 24, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mesa: simplify overriding GALLIUMDRIVERS_LLVM

Embedded devices might want to extend and/or override the GALLIUMDRIVERS_LLVM variable (to change the set of gallium drivers enabled for the particular device). Simplify this task by making the GALLIUMDRIVERS_LLVM variable follow the rest of mesa.inc variables and contain the leading comma.

---
 meta/recipes-graphics/mesa/mesa.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +2 -2
index 928899008e62..ade097d7cc5a 100644
@@ -163,7 +163,7 @@ GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '
 
 # radeonsi requires LLVM
 GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
-GALLIUMDRIVERS_LLVM = "r300,nouveau${GALLIUMDRIVERS_RADEONSI}"
+GALLIUMDRIVERS_LLVM = ",r300,nouveau${GALLIUMDRIVERS_RADEONSI}"
 GALLIUMDRIVERS_LLVM:append:x86 = ",svga"
 GALLIUMDRIVERS_LLVM:append:x86-64 = ",svga"
 # i686 is a 32 bit override for mesa-native
@@ -172,7 +172,7 @@ GALLIUMDRIVERS_LLVM:append:i686 = ",svga"
 PACKAGECONFIG[r600] = ""
 PACKAGECONFIG[virgl] = ""
 
-GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
+GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${GALLIUMDRIVERS_LLVM}', '', d)}"
 GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}"
 GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}"
 
Signature · 1 line
2.39.2
#1 lore raw

PATCH 2/2 mesa: enable swrast Vulkan driver if LLVM drivers are enabled

The software Vulkan driver requires the LLVM to be built. Make this driver enabled if the `gallium-llvm' config option is enabled.

---
 meta/recipes-graphics/mesa/mesa.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-graphics/mesa/mesa.inc +1 -0
index ade097d7cc5a..79a1d975bf75 100644
@@ -106,6 +106,7 @@ VULKAN_DRIVERS:append:x86-64 = ",intel"
 VULKAN_DRIVERS:append:i686 = ",intel"
 VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
 VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}"
+VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',swrast', '', d)}"
 PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers"
 
 # mesa development and testing tools support, per driver
Signature · 1 line
2.39.2