Debian Codegraph @

infra/bots/assets/mesa_intel_driver_linux/mesa-driver-builder/build_mesa.sh

raw
1 #! /bin/bash
2 #
3 # Copyright 2018 Google LLC
4 #
5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file.
7 #
8 # Builds the mesa driver and copies it to /OUT
9 # This script uses the environement variable $MESA_VERSION
10 # to dermine which version to download and build.
11
12 set -ex
13
14 pushd /tmp
15
16 wget https://mesa.freedesktop.org/archive/mesa-$MESA_VERSION.tar.gz
17 tar --gunzip --extract --file mesa-$MESA_VERSION.tar.gz
18 cd mesa-$MESA_VERSION/
19
20 ./configure --with-dri-drivers=i965 --with-gallium-drivers= --with-vulkan-drivers=intel
21 make -j 50
22
23 cp lib/* /OUT
24 cp src/intel/vulkan/intel_icd.x86_64.json /OUT
25
26 # Change "library_path": "/usr/local/lib/libvulkan_intel.so"
27 # to "library_path": "./libvulkan_intel.so"
28 sed -i -e 's/\/usr\/local\/lib/\./g' /OUT/intel_icd.x86_64.json
29
30 popd