1# Creating the Mesa Intel Linux driver asset (which supports Vulkan) 2 3Using the automated asset python scripts requires that Docker be installed. 4 5 $ sk asset upload mesa_intel_driver_linux_22 6 7See below for steps on just building the driver. 8 9## WARNING 10 11This asset is `mesa_intel_driver_linux_22`. 12 13There is also `mesa_intel_driver_linux`, which contains pre-version 1422 copies of the Mesa drivers, that's because in v22 Mesa dropped support for 15"legacy" drivers which covers many of our existing Intel jobs. 16 17## Using Docker 18 19It is easiest to just use the Dockerfile provided: 20 21 docker build -t mesa-driver-builder:latest ./mesa-driver-builder/ 22 docker run --volume /tmp/out:/OUT --env MESA_VERSION=22.1.3 mesa-driver-builder:latest 23 24You may change `/tmp/out` to be the desired output directory and `22.1.3` to be the desired 25version of the mesa driver. 26 27Finally, use `/tmp/out` as the input directory to the upload script. 28 29## Testing 30 31Testing both the Vulkan and GLX drivers is done via setting environment variables. 32 33For example, if the above is run and the build drivers are in `/tmp/out/` then they can be tested via: 34 35 cd /tmp/out 36 LIBGL_DRIVERS_PATH=`pwd` glxinfo | grep -i Mesa 37 VK_ICD_FILENAMES="./intel_icd.x86_64.json" vulkaninfo | grep Mesa 38 39N.B. Make sure to pick a version of Mesa that your desktop is not currently 40using and then run both commands above both with and w/o the environment 41variables set to confirm that the drivers are really being picked up. For example: 42 43With the 22.1.3 drivers: 44 45~~~console 46chrome-bot@skia-e-linux-600:~/mesa/foo$ VK_ICD_FILENAMES="./intel_icd.x86_64.json" vulkaninfo | grep Mesa 47VK_LAYER_MESA_overlay (Mesa Overlay layer) Vulkan version 1.3.211, layer version 1: 48 driverName = Intel open-source Mesa driver 49 driverInfo = Mesa 22.1.3 50 driverName = Intel open-source Mesa driver 51 driverInfo = Mesa 22.1.3 52~~~ 53 54Compared to the installed 22.0.5 drivers: 55 56~~~console 57chrome-bot@skia-e-linux-600:~/mesa/foo$ vulkaninfo | grep Mesa 58WARNING: lavapipe is not a conformant vulkan implementation, testing use only. 59VK_LAYER_MESA_overlay (Mesa Overlay layer) Vulkan version 1.3.211, layer version 1: 60WARNING: lavapipe is not a conformant vulkan implementation, testing use only. 61 driverName = Intel open-source Mesa driver 62 driverInfo = Mesa 22.0.5 63 driverName = Intel open-source Mesa driver 64 driverInfo = Mesa 22.0.5 65 driverInfo = Mesa 22.0.5 (LLVM 14.0.4) 66 driverInfo = Mesa 22.0.5 (LLVM 14.0.4) 67~~~