Mesa (master): ci: Install llvm-spirv from Debian bullseye

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 14 13:34:18 UTC 2021


Module: Mesa
Branch: master
Commit: 0155881d8288878f384d7b7645a3758ee733cac3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0155881d8288878f384d7b7645a3758ee733cac3

Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Mon Mar 22 16:43:02 2021 +0100

ci: Install llvm-spirv from Debian bullseye

While we're at it, use a tag instead of whatever happens to be the
current main branch for building libclc.

Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833>

---

 .gitlab-ci.yml                       |  4 ++--
 .gitlab-ci/container/build-libclc.sh | 15 +++------------
 .gitlab-ci/container/x86_build.sh    | 10 +---------
 .gitlab-ci/container/x86_test-gl.sh  |  3 +++
 4 files changed, 9 insertions(+), 23 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 22fc556adea..205e1a105f0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -313,7 +313,7 @@ x86_build:
   extends:
     - .use-x86_build-base
   variables:
-    MESA_IMAGE_TAG: &x86_build "2021-04-13-spirv-tools"
+    MESA_IMAGE_TAG: &x86_build "2021-04-13-llvm-spirv"
 
 .use-x86_build:
   extends:
@@ -413,7 +413,7 @@ x86_test-base:
 x86_test-gl:
   extends: .use-x86_test-base
   variables:
-    MESA_IMAGE_TAG: &x86_test-gl "2021-04-14-spirv-tools"
+    MESA_IMAGE_TAG: &x86_test-gl "2021-04-14-llvm-spirv"
 
 # Debian 11 based x86 test image for VK
 x86_test-vk:
diff --git a/.gitlab-ci/container/build-libclc.sh b/.gitlab-ci/container/build-libclc.sh
index d534f147d20..ecf7f21c9ea 100644
--- a/.gitlab-ci/container/build-libclc.sh
+++ b/.gitlab-ci/container/build-libclc.sh
@@ -6,26 +6,17 @@ export LLVM_CONFIG="llvm-config-11"
 
 $LLVM_CONFIG --version
 
-git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator -b llvm_release_110 --single-branch --shallow-since=2020-11-12 /SPIRV-LLVM-Translator
-pushd /SPIRV-LLVM-Translator
-# Last commit before bumping required LLVM version to 11.1.0
-git checkout 93032d36d2fe17befb7994714c07c67ea68efbea
-cmake -S . -B . -G Ninja -DLLVM_BUILD_TOOLS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_INSTALL_PREFIX=`$LLVM_CONFIG --prefix`
-ninja
-ninja install
-popd
-
-
 git config --global user.email "mesa at example.com"
 git config --global user.name "Mesa CI"
 git clone \
     https://github.com/llvm/llvm-project \
     --depth 1 \
+    -b llvmorg-12.0.0-rc3 \
     /llvm-project
 
 mkdir /libclc
 pushd /libclc
-cmake -S /llvm-project/libclc -B . -G Ninja -DLLVM_CONFIG=$LLVM_CONFIG -DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
+cmake -S /llvm-project/libclc -B . -G Ninja -DLLVM_CONFIG=$LLVM_CONFIG -DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_SPIRV=/usr/bin/llvm-spirv
 ninja
 ninja install
 popd
@@ -36,4 +27,4 @@ ln -s /usr/share/clc/spirv64-mesa3d-.spv /usr/lib/clc/
 ln -s /usr/share/clc/spirv-mesa3d-.spv /usr/lib/clc/
 
 du -sh *
-rm -rf /libclc /llvm-project /SPIRV-LLVM-Translator
+rm -rf /libclc /llvm-project
diff --git a/.gitlab-ci/container/x86_build.sh b/.gitlab-ci/container/x86_build.sh
index 2b9a6d1460d..4d4b7622b67 100644
--- a/.gitlab-ci/container/x86_build.sh
+++ b/.gitlab-ci/container/x86_build.sh
@@ -27,6 +27,7 @@ apt-get install -y --no-remove \
       libasan6 \
       libarchive-dev \
       libclang-cpp11-dev \
+      libllvmspirvlib-dev \
       liblua5.3-dev \
       libxcb-dri2-0-dev \
       libxcb-dri3-dev \
@@ -93,15 +94,6 @@ pushd libglvnd-v$GLVND_VERSION; ./autogen.sh; ./configure; make install; popd
 rm -rf libglvnd-v$GLVND_VERSION
 
 
-git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator -b llvm_release_110 --single-branch --shallow-since=2020-11-12
-pushd SPIRV-LLVM-Translator
-# Last commit before bumping required LLVM version to 11.1.0
-git checkout 93032d36d2fe17befb7994714c07c67ea68efbea
-cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC
-ninja
-ninja install
-popd
-
 pushd /usr/local
 git clone https://gitlab.freedesktop.org/mesa/shader-db.git --depth 1
 rm -rf shader-db/.git
diff --git a/.gitlab-ci/container/x86_test-gl.sh b/.gitlab-ci/container/x86_test-gl.sh
index 68907f2c359..4b311cb05dd 100644
--- a/.gitlab-ci/container/x86_test-gl.sh
+++ b/.gitlab-ci/container/x86_test-gl.sh
@@ -16,6 +16,7 @@ STABLE_EPHEMERAL=" \
       libclang-cpp11-dev \
       libgbm-dev \
       libgles2-mesa-dev \
+      libllvmspirvlib-dev \
       libpciaccess-dev \
       libudev-dev \
       libvulkan-dev \
@@ -25,6 +26,7 @@ STABLE_EPHEMERAL=" \
       libxkbcommon-dev \
       libxrender-dev \
       llvm-11-dev \
+      llvm-spirv \
       make \
       meson \
       ocl-icd-opencl-dev \
@@ -42,6 +44,7 @@ apt-get install -y --no-remove \
       libclang-common-11-dev \
       libclang-cpp11 \
       libegl1 \
+      libllvmspirvlib11 \
       libxcb-shm0 \
       ocl-icd-libopencl1 \
       python3-lxml \



More information about the mesa-commit mailing list