Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f7e2ae89c7
Fetching contributors…

Cannot retrieve contributors at this time

96 lines (79 sloc) 3.428 kb
SUPPORTED_DRIVERS="i915 i965 nouveau r200 radeon swrast"
SUPPORTED_GALLIUM="i915 nouveau r300 r600 svga swrast"
make_drivers_checklist() {
# For each locale, extract name, title and charmap information
for driver in $SUPPORTED_DRIVERS; do
title=$driver
echo "\"$driver\" \"$title\" \"on\" "
done
}
make_gallium_drivers_checklist() {
# For each locale, extract name, title and charmap information
for driver in $SUPPORTED_GALLIUM; do
title=$driver
echo "\"$driver\" \"$title\" \"on\" "
done
}
select_drivers() {
BACKTITLE="MesaLib Configuration"
TITLE="Driver Selection"
HELP=""
make_drivers_checklist | xargs \
dialog --backtitle "$BACKTITLE" \
--title "$TITLE" \
--stdout \
--separate-output \
--checklist "$HELP" \
0 0 0
}
select_gallium_drivers() {
BACKTITLE="Gallium Configuration"
TITLE="Gallium Driver Selection"
HELP=""
make_gallium_drivers_checklist | xargs \
dialog --backtitle "$BACKTITLE" \
--title "$TITLE" \
--stdout \
--separate-output \
--checklist "$HELP" \
0 0 0
}
if ! grep -q "MESADRIVER=" $MODULE_CONFIG; then
MESADRIVER=`select_drivers`
set_module_config MESADRIVER "$MESADRIVER"
fi
if [[ -z "$(get_module_config CONFIGURED)" ]]; then
message "${MESSAGE_COLOR}Gallium is an alternative to DRI and needed to do 3D acceleration on"
message "nouveau, radeon(-hd), ati or Intel GMA (Poulsbo/Cedar Trail). However, Gallium is not"
message "performing on Intel GENX graphics (Any onboard Corei3/5/7, G25/33/45, pinetrail gfx"
message ""
message "Open Source Drivers:"
message "If you build for Intel DRI-based hardware, disable Gallium, llvm and enable libva, xvmc."
message "If you build for Intel CedarTrail or Poulsbo, enable Gallium, llvm, xvmc, vdpau."
message "If you build for NVidia or Ati hardware, enable Gallium, llvm, xvmc, vdpau."
message ""
message "Binary / Proprietary Drivers:"
message "If building the NVIDIA/fglrx binary driver, disable gallium, llvm, vdpau, xvmc."
message "${DEFAULT_COLOR}"
fi
mquery GALLIUM "Enable Gallium llvm renderer?" y "--enable-gallium-llvm" "--disable-gallium-llvm"
# mquery doesn't return or set env's, so read out the result:
GALLIUM=`get_module_config GALLIUM`
if [[ $GALLIUM == y ]] ; then
if ! grep -q "GALLIUMDRIVER=" $MODULE_CONFIG; then
GALLIUMDRIVER=`select_gallium_drivers`
set_module_config GALLIUMDRIVER "$GALLIUMDRIVER"
fi
fi
mquery XA "Enable XA support?" y "--enable-xa" "--disable-xa"
if [[ $GALLIUM == y ]]; then
mquery EGL "Enable EGL (for i9x5)?" y "--enable-egl --enable-gallium-egl" "--disable-egl --disable-gallium-egl"
mquery OPENVG "Enable openVG?" y "--enable-openvg" "--disable-openvg"
mquery D3D "Enable D3D API's?" n "--enable-d3d1x --enable-gallium-g3dvl" "--disable-d3d1x --disable-gallium-g3dvl"
else
mquery EGL "Enable EGL (for i9x5)?" y "--enable-egl" "--disable-egl"
mquery D3D "Enable D3D API's?" n "--enable-d3d1x" "--disable-d3d1x"
fi
mquery TEXTURE_FLOAT "Enable patented texture-float? (if this patent is valid in your country choose N)" n "--enable-texture-float" "--disable-texture-float"
mquery ENABLE_GLX_TLS "Enable glx-tls? (lin -r xorg-server also)" y "--enable-glx-tls" "--disable-glx-tls"
set_module_config CONFIGURED y
Jump to Line
Something went wrong with that request. Please try again.