ci: Build vkd3d with SPIRV-Tools.

This commit is contained in:
Giovanni Mascellani 2023-09-25 15:45:36 +02:00 committed by Alexandre Julliard
parent ec4986e9e2
commit f087aa752d
Notes: Alexandre Julliard 2023-12-13 23:22:34 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/504
3 changed files with 33 additions and 4 deletions

View File

@ -12,7 +12,7 @@ rm -fr build
mkdir build mkdir build
cd build cd build
export LD_LIBRARY_PATH=/usr/local/lib export LD_LIBRARY_PATH=/usr/local/lib
if ../configure --enable-demos DXCOMPILER_LIBS="-L/usr/local/lib" CFLAGS="-g -O2 -Werror" CPPFLAGS="-DVKD3D_SHADER_UNSUPPORTED_DXIL" && \ if ../configure --enable-demos --with-spirv-tools DXCOMPILER_LIBS="-L/usr/local/lib" CFLAGS="-g -O2 -Werror" CPPFLAGS="-DVKD3D_SHADER_UNSUPPORTED_DXIL" && \
make -j$(nproc) ; then make -j$(nproc) ; then
make -j$(nproc) check || \ make -j$(nproc) check || \
touch ../tests_failed touch ../tests_failed

View File

@ -48,7 +48,7 @@ build-radv-32:
- amd-gpu - amd-gpu
variables: variables:
VK_LOADER_DRIVERS_SELECT: 'radeon_*' VK_LOADER_DRIVERS_SELECT: 'radeon_*'
CC: 'gcc -m32' CC: 'i686-linux-gnu-gcc'
VKD3D_SHADER_CONFIG: 'force_validation' VKD3D_SHADER_CONFIG: 'force_validation'
build-llvmpipe-32: build-llvmpipe-32:
@ -58,7 +58,7 @@ build-llvmpipe-32:
- 2 - 2
variables: variables:
VK_LOADER_DRIVERS_SELECT: 'lvp_*' VK_LOADER_DRIVERS_SELECT: 'lvp_*'
CC: 'gcc -m32' CC: 'i686-linux-gnu-gcc'
VKD3D_SHADER_CONFIG: 'force_validation' VKD3D_SHADER_CONFIG: 'force_validation'
build-crosstest: build-crosstest:

View File

@ -2,6 +2,12 @@
WORKDIR /tmp WORKDIR /tmp
# Package spirv-tools from Debian has two problems for us: first, it
# doesn't have shared libraries; second, it's not multiarch. So we
# have to rebuild it with some tweaks. In order to make it multiarch
# we also have to drop the executables, but we don't care about those
# anyway.
RUN export DEBIAN_FRONTEND=noninteractive; \ RUN export DEBIAN_FRONTEND=noninteractive; \
echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \ echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
echo 'path-exclude=/usr/share/locale/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \ echo 'path-exclude=/usr/share/locale/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
@ -11,9 +17,10 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
echo 'exit 101' >> /usr/sbin/policy-rc.d && \ echo 'exit 101' >> /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \ chmod +x /usr/sbin/policy-rc.d && \
dpkg --add-architecture i386 && \ dpkg --add-architecture i386 && \
sed -i -e 's|Types: deb|Types: deb deb-src|g' /etc/apt/sources.list.d/* && \
apt-get update && \ apt-get update && \
apt-get dist-upgrade -y && \ apt-get dist-upgrade -y && \
apt-get install -y build-essential pkg-config gcc-multilib gcc-mingw-w64 \ apt-get install -y build-essential pkg-config gcc-mingw-w64 crossbuild-essential-i386 \
autoconf automake libtool flex bison curl \ autoconf automake libtool flex bison curl \
git ca-certificates rsync \ git ca-certificates rsync \
doxygen doxygen-latex graphviz \ doxygen doxygen-latex graphviz \
@ -27,6 +34,8 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
libxcb-util-dev libxcb-util-dev:i386 \ libxcb-util-dev libxcb-util-dev:i386 \
libxcb-icccm4-dev libxcb-icccm4-dev:i386 \ libxcb-icccm4-dev libxcb-icccm4-dev:i386 \
libxcb-keysyms1-dev libxcb-keysyms1-dev:i386 && \ libxcb-keysyms1-dev libxcb-keysyms1-dev:i386 && \
apt-get build-dep -y spirv-tools && \
apt-get build-dep -y -ai386 spirv-tools && \
git clone --depth 1 --branch wine-3.21 https://gitlab.winehq.org/wine/wine.git && \ git clone --depth 1 --branch wine-3.21 https://gitlab.winehq.org/wine/wine.git && \
cd wine && \ cd wine && \
mkdir build && \ mkdir build && \
@ -36,6 +45,26 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
cp tools/widl/widl /usr/local/bin && \ cp tools/widl/widl /usr/local/bin && \
cd ../.. && \ cd ../.. && \
rm -rf wine && \ rm -rf wine && \
apt-get source spirv-tools && \
cd spirv-tools-* && \
sed -i -e 's|-DBUILD_SHARED_LIBS=OFF|-DBUILD_SHARED_LIBS=ON|g' debian/rules && \
sed -i -e 's|dh_install$|dh_install \&\& rm debian/spirv-tools/usr/bin/*|g' debian/rules && \
sed -i '/Architecture: any/a Multi-Arch: same' debian/control && \
dpkg-buildpackage -uc -us && \
cd .. && \
rm -f spirv-tools-dbgsym_*.deb && \
dpkg -i spirv-tools_*.deb && \
rm -fr * && \
apt-get source spirv-tools && \
cd spirv-tools-* && \
sed -i -e 's|-DBUILD_SHARED_LIBS=OFF|-DBUILD_SHARED_LIBS=ON|g' debian/rules && \
sed -i -e 's|dh_install$|dh_install \&\& rm debian/spirv-tools/usr/bin/*|g' debian/rules && \
sed -i '/Architecture: any/a Multi-Arch: same' debian/control && \
CONFIG_SITE=/etc/dpkg-cross/cross-config.amd64 DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -ai386 -Pcross,nocheck -uc -us && \
cd .. && \
rm -f spirv-tools-dbgsym_*.deb && \
dpkg -i spirv-tools_*.deb && \
rm -fr * && \
apt-get clean && \ apt-get clean && \
curl -L -s https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.7.2308/linux_dxc_2023_08_14.x86_64.tar.gz | tar zx -C /usr/local ./lib/libdxcompiler.so ./lib/libdxil.so && \ curl -L -s https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.7.2308/linux_dxc_2023_08_14.x86_64.tar.gz | tar zx -C /usr/local ./lib/libdxcompiler.so ./lib/libdxil.so && \
groupadd host-render -g 800 && \ groupadd host-render -g 800 && \