New commits:
commit e45533b9232161d28844b1672c29e0891b036a37
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>
graphics-libs/mesa: add support, improve options
Add support for more drivers. Upstream mesa includes drivers for ARM
platforms, and they are now added here.
Improve option presentation and handling. For options that are entirely
dependent on other options being enabled, they are only presented when
their dependents are enabled. Many of the option messages were also
reworded or expanded upon to better clarify their meaning and use for
the user.
The handling of empty list options was also corrected in BUILD.
diff --git a/graphics-libs/mesa/BUILD b/graphics-libs/mesa/BUILD
index 106a5f6..0554311 100755
--- a/graphics-libs/mesa/BUILD
+++ b/graphics-libs/mesa/BUILD
@@ -16,8 +16,8 @@ case "$HOST" in
for i in "${unportable[@]}"; do
MESA_TOOLS="${MESA_TOOLS// $i / }"
done
- MESA_TOOLS="${MESA_TOOLS## }"
- MESA_TOOLS="${MESA_TOOLS%% }"
+ MESA_TOOLS="${MESA_TOOLS# }"
+ MESA_TOOLS="${MESA_TOOLS% }"
;;
esac &&
@@ -67,9 +67,7 @@ if [[ "${MESA_BRANCH}" != "scm" ]] ;then
meson_opt boolean "opencl-spirv" "$MESA_OPENCL_SPIRV"
fi &&
config_query_multi MESA_GALLIUM "Which gallium (accelerated) drivers to
build?" \
none \
all \
auto \
- $(echo $AVAILABLE_GALLIUM | sort) \
+ $(sort_list $AVAILABLE_GALLIUM) \
&&
if [ -n "$MESA_GALLIUM" ] && ! list_find "$MESA_GALLIUM" none ;then
config_query MESA_GALLIUM_HUD "Enable HUD block/NIC I/O HUD status
support?" n &&
local allow_xa
+ # XA state tracker requires one of the following gallium drivers
for driver in nouveau freedreno i915 svga ;do
if list_find "$MESA_GALLIUM" $driver ;then
allow_xa="y"
fi
- done
+ done &&
+
if [[ "$allow_xa" == "y" ]] ;then
config_query MESA_GALLIUM_XA "Build gallium XA frontend?" n
fi &&
+ if list_find "$MESA_GALLIUM" vmware ;then
+ if ! list_find "$MESA_GALLIUM" svga ;then
+ message "The vmware driver requires gallium svga; adding gallium
svga." &&
+ MESA_GALLIUM="$MESA_GALLIUM svga"
+ fi
+ fi &&
+
if list_find "$MESA_GALLIUM" llvmpipe || list_find "$MESA_GALLIUM"
softpipe ;then
config_query MESA_GALLIUM_D3D9 "Build gallium Direct3D9 (nine)
frontend?" n &&
- config_query MESA_GALLIUM_D3D10 "Build gallium Direct3D10 (WDDM UMD)
frontend?" n
+ if list_find "$MESA_DRIVERS" WSL ;then
+ config_query MESA_GALLIUM_D3D10 "Build gallium Direct3D10 (WDDM UMD)
frontend?" n
+ fi
fi &&
if list_find "$MESA_GALLIUM" d3d12 ;then
@@ -76,7 +201,7 @@ if [ -n "$MESA_GALLIUM" ] && ! list_find "$MESA_GALLIUM"
none ;then
fi
fi &&
# EGL requires DRI, which is only enabled if gallium is enabled
if ! list_find "$MESA_GALLIUM" none ;then
- config_query MESA_EGL "Enable EGL platform support?" n &&
+ # Walyand requires EGL support
+ if list_find "$MESA_PLATFORMS" wayland || (list_find "$MESA_PLATFORMS"
auto && spell_ok wayland) ;then
+ MESA_EGL=y &&
+ persistent_add MESA_EGL
+ else
+ config_query MESA_EGL "Enable EGL platform support?" n
+ fi &&
if [[ "$MESA_EGL" == "y" ]] ;then
+ local egldefaults="drm surfaceless" &&
+ if list_find "$MESA_PLATFORMS" x11 ;then
+ egldefaults="$egldefaults x11"
+ fi &&
+ if list_find "$MESA_PLATFORMS" wayland ;then
+ egldefaults="$egldefaults wayland"
+ fi &&
+ if list_find "$MESA_PLATFORMS" WSL ;then
+ egldefaults="$egldefaults windows"
+ fi &&
config_query_list MESA_EGL_DEFAULT "Which window system should EGL
assume for EGL_DEFAULT_DISPLAY" \
auto \
- drm \
- surfaceless \
- wayland \
- x11
+ $(sort_list $egldefaults)
fi
fi &&
config_query MESA_GLES1 "Support OpenGL ES 1.x?" n &&
config_query MESA_GLES23 "Support OpenGL ES 2.x and 3.x?" n &&
config_query MESA_OPENGL "Enable desktop OpenGL support?" y &&
-config_query MESA_GBM "Enable gbm platform support?" n &&
+config_query MESA_GBM "Enable generic buffer management (GBM) support?" n &&
config_query MESA_OSMESA "Build OSmesa to support off-screen rendering?" n &&
-config_query_list MESA_GLX "Which glx build type (auto or dri recommended)?"
\
+config_query_list MESA_GLX "Which GLX build type (auto or dri recommended)?"
\
auto \
disabled \
dri \
@@ -137,11 +275,11 @@ if list_find "${MESA_GLX}" "disabled"; then
MESA_GLX="disabled"
else
config_query MESA_GLX_DIRECT "Enable direct rendering in GLX and EGL for
DRI?" y &&
- config_query MESA_GLX_READONLY "Disable writable .text section on x86
(decreases performance)?" n
+ config_query MESA_GLX_READONLY "Read-only GLX (disable writable .text
section) on x86 (decreases performance)?" n
fi &&
if [[ "$MESA_EGL" == "y" ]] || ! list_find "$MESA_GLX" disabled ;then
- config_query MESA_GLVND "Enable GLVND support?" n
+ config_query MESA_GLVND "Enable OpenGL vendor-neutral dispatch (GLVND)
support?" n
fi &&
config_query MESA_SPIRV_DXIL "Build support for the SPIR-V to DXIL library?"
n &&
@@ -149,29 +287,32 @@ config_query MESA_SPIRV_DXIL "Build support for the
SPIR-V to DXIL library?" n &
config_query_multi MESA_TOOLS "Which tools to build?" \
none \
all \
- dlclose-skip \
- drm-shim \
- etnaviv \
- freedreno \
- glsl \
- intel \
- intel-ui \
- nir \
- nouveau \
+ $(sort_list $AVAILABLE_TOOLS) \
&&
-config_query MESA_PERFETTO "Enable performance analysis with Perfetto" n &&
-
-if [[ "$MESA_PERFETTO" == "y" ]] ;then
- config_query_multi MESA_PERFETTO_SOURCES "Perfetto datasources to build" \
- auto \
- intel
+local perfetto_sources=""
+if list_find "$MESA_DRIVERS" freedreno ;then
+ perfetto_sources="$perfetto_sources intel"
+fi &&
+if list_find "$MESA_DRIVERS" intel ;then
+ perfetto_sources="$perfetto_sources intel"
+fi &&
+if list_find "$MESA_DRIVERS" panfrost ;then
+ perfetto_sources="$perfetto_sources intel"
+fi &&
+if [ -n "$perfetto_sources" ] ;then
+ config_query MESA_PERFETTO "Enable performance analysis with Perfetto" n &&
+ if [[ "$MESA_PERFETTO" == "y" ]] ;then
+ config_query_multi MESA_PERFETTO_SOURCES "Perfetto datasources to build"
\
+ auto \
+ $(sort_list $perfetto_sources)
+ fi
fi &&
config_query MESA_TEFLON "Enable TensorFlow Lite delegate" n &&
config_query MESA_GPUVIS "Enable tracing markers for gpuvis" n &&
-if list_find "$MESA_DRM" INTEL;then
+if list_find "$MESA_VULKAN" intel || list_find "$MESA_VULKAN" intel_hasvk
;then
config_query MESA_INTEL_RT "Build Intel raytracing support (on supported
hardware)?" n
fi &&
@@ -192,9 +333,18 @@ config_query_multi MESA_VIDEO_CODECS "Which codecs to
build?" \
config_query MESA_XMLCONFIG "Enable custom xmlconfig (driconf) support
(requires expat)?" n &&
# strip any leading or trailing spaces from the driver lists
-MESA_GALLIUM="${MESA_GALLIUM## }" &&
-MESA_GALLIUM="${MESA_GALLIUM%% }" &&
+MESA_DRM="$(echo "$MESA_DRM" | sed 's,\s\+, ,g')" &&
+MESA_DRM="${MESA_DRM# }" &&
+MESA_DRM="${MESA_DRM% }" &&
+MESA_GALLIUM="$(echo "$MESA_GALLIUM" | sed 's,\s\+, ,g')" &&
+MESA_GALLIUM="${MESA_GALLIUM# }" &&
+MESA_GALLIUM="${MESA_GALLIUM% }" &&
+MESA_VULKAN="$(echo "$MESA_VULKAN" | sed 's,\s\+, ,g')" &&
+MESA_VULKAN="${MESA_VULKAN# }" &&
+MESA_VULKAN="${MESA_VULKAN% }" &&
+
+persistent_add MESA_DRM &&
+persistent_add MESA_DIVERS &&
persistent_add MESA_GALLIUM &&
-MESA_VULKAN="${MESA_VULKAN## }" &&
-MESA_VULKAN="${MESA_VULKAN%% }" &&
+persistent_add MESA_GLX &&
persistent_add MESA_VULKAN
diff --git a/graphics-libs/mesa/DEPENDS b/graphics-libs/mesa/DEPENDS
index c83ad0d..e873bf9 100755
--- a/graphics-libs/mesa/DEPENDS
+++ b/graphics-libs/mesa/DEPENDS
@@ -118,12 +118,12 @@ done
if [[ "$allow_va_and_vdpau" == "y" ]] ;then
buildsys_optional_depends libvdpau \
-o gallium-vdpau \
- "gallium vdpau state tracker" \
+ "gallium VDPAU state tracker" \
&&
buildsys_optional_depends libva \
-o gallium-va \
- "gallium va state tracker"
+ "gallium VAAPI state tracker"
fi &&
buildsys_optional_depends lm_sensors \
@@ -158,4 +158,8 @@ fi &&
if [[ "$MESA_XMLCONFIG" == "y" ]] ;then
buildsys_depends expat &&
suggest_depends driconf "to create custom xmlconfig (driconf) files"
+else
+ buildsys_optional_depends expat \
+ -o expat \
+ "Use expat?"
fi
diff --git a/graphics-libs/mesa/HISTORY b/graphics-libs/mesa/HISTORY
index 6d9376a..a130b04 100644
--- a/graphics-libs/mesa/HISTORY
+++ b/graphics-libs/mesa/HISTORY
@@ -1,3 +1,8 @@
+2025-01-24 Justin Boffemmyer <flux AT sourcemage.org>
+ * BUILD: fix handling of empty list options
+ * CONFIGURE: support more drivers, improve interdependent option
selections
+ * DEPENDS: improve hint messages, support expat without xmlconfig
+
2025-01-23 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 24.3.4
* BUILD, CONFIGURE: opencl-spirv flag is for stable branch only
[[SM-Commit] ] GIT changes to master grimoire by Justin Boffemmyer (e45533b9232161d28844b1672c29e0891b036a37),
Justin Boffemmyer, 01/24/2025