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 12set -ex 13 14pushd /tmp 15 16wget https://mesa.freedesktop.org/archive/mesa-$MESA_VERSION.tar.gz 17tar --gunzip --extract --file mesa-$MESA_VERSION.tar.gz 18cd mesa-$MESA_VERSION/ 19 20./configure --with-dri-drivers=i965 --with-gallium-drivers= --with-vulkan-drivers=intel 21make -j 50 22 23cp lib/* /OUT 24cp 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" 28sed -i -e 's/\/usr\/local\/lib/\./g' /OUT/intel_icd.x86_64.json 29 30popd 31