This goes on top of !346. See [a pipeline example](https://gitlab.winehq.org/giomasce/vkd3d/-/pipelines/16064).
-- v2: ci: Run tests using dxcompiler. ci: Build the DXIL parser. tests: Fail if dxcompiler is not available at runtime. ci: Build widl for 64 bit. ci: Speed up the Docker image creation with eatmydata.
From: Giovanni Mascellani gmascellani@codeweavers.com
--- gitlab/image.docker | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/gitlab/image.docker b/gitlab/image.docker index dd6923cbd..8798297cd 100644 --- a/gitlab/image.docker +++ b/gitlab/image.docker @@ -12,19 +12,20 @@ RUN export DEBIAN_FRONTEND=noninteractive; \ chmod +x /usr/sbin/policy-rc.d && \ dpkg --add-architecture i386 && \ apt-get update && \ - apt-get dist-upgrade -y && \ - apt-get install -y build-essential pkg-config gcc-multilib gcc-mingw-w64 \ - autoconf automake libtool flex bison \ - git ca-certificates rsync \ - doxygen doxygen-latex graphviz \ - mesa-vulkan-drivers mesa-vulkan-drivers:i386 \ - vulkan-tools spirv-headers \ - libvulkan-dev libvulkan-dev:i386 \ - libncurses-dev libncurses-dev:i386 \ - libxcb1-dev libxcb1-dev:i386 \ - libxcb-util-dev libxcb-util-dev:i386 \ - libxcb-icccm4-dev libxcb-icccm4-dev:i386 \ - libxcb-keysyms1-dev libxcb-keysyms1-dev:i386 && \ + apt-get install -y eatmydata && \ + eatmydata apt-get dist-upgrade -y && \ + eatmydata apt-get install -y build-essential pkg-config gcc-multilib gcc-mingw-w64 \ + autoconf automake libtool flex bison \ + git ca-certificates rsync \ + doxygen doxygen-latex graphviz \ + mesa-vulkan-drivers mesa-vulkan-drivers:i386 \ + vulkan-tools spirv-headers \ + libvulkan-dev libvulkan-dev:i386 \ + libncurses-dev libncurses-dev:i386 \ + libxcb1-dev libxcb1-dev:i386 \ + libxcb-util-dev libxcb-util-dev:i386 \ + libxcb-icccm4-dev libxcb-icccm4-dev:i386 \ + libxcb-keysyms1-dev libxcb-keysyms1-dev:i386 && \ git clone --depth 1 --branch wine-3.21 https://gitlab.winehq.org/wine/wine.git && \ cd wine && \ mkdir build && \
From: Giovanni Mascellani gmascellani@codeweavers.com
--- gitlab/image.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gitlab/image.docker b/gitlab/image.docker index 8798297cd..c85ee3e57 100644 --- a/gitlab/image.docker +++ b/gitlab/image.docker @@ -30,7 +30,7 @@ RUN export DEBIAN_FRONTEND=noninteractive; \ cd wine && \ mkdir build && \ cd build && \ - ../configure --without-x --without-freetype && \ + ../configure --enable-win64 --without-x --without-freetype && \ make tools/widl/widl && \ cp tools/widl/widl /usr/local/bin && \ cd ../.. && \
From: Giovanni Mascellani gmascellani@codeweavers.com
--- tests/shader_runner.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/tests/shader_runner.c b/tests/shader_runner.c index cae0bf026..423f42bd3 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -1457,23 +1457,20 @@ static IDxcCompiler3 *dxcompiler_create() HRESULT hr; void *dll;
- if (!(dll = vkd3d_dlopen(SONAME_LIBDXCOMPILER))) - { - trace("Failed to load dxcompiler library, %s.\n", vkd3d_dlerror()); + dll = vkd3d_dlopen(SONAME_LIBDXCOMPILER); + ok(dll, "Failed to load dxcompiler library, %s.\n", vkd3d_dlerror()); + if (!dll) return NULL; - }
- if (!(create_instance = (DxcCreateInstanceProc)vkd3d_dlsym(dll, "DxcCreateInstance"))) - { - trace("Failed to get DxcCreateInstance() pointer.\n"); + create_instance = (DxcCreateInstanceProc)vkd3d_dlsym(dll, "DxcCreateInstance"); + ok(create_instance, "Failed to get DxcCreateInstance() pointer.\n"); + if (!create_instance) return NULL; - }
- if (FAILED(hr = create_instance(&CLSID_DxcCompiler, &IID_IDxcCompiler3, (void **)&compiler))) - { - trace("Failed to create instance, hr %#x.\n", hr); + hr = create_instance(&CLSID_DxcCompiler, &IID_IDxcCompiler3, (void **)&compiler); + ok(SUCCEEDED(hr), "Failed to create instance, hr %#x.\n", hr); + if (FAILED(hr)) return NULL; - }
return compiler; }
From: Giovanni Mascellani gmascellani@codeweavers.com
--- gitlab/build-linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gitlab/build-linux b/gitlab/build-linux index 661180f57..9a26849ca 100755 --- a/gitlab/build-linux +++ b/gitlab/build-linux @@ -11,7 +11,7 @@ set -Eeuxo pipefail rm -fr build mkdir build cd build -../configure --enable-demos CFLAGS="-g -O2 -Werror" && \ +../configure --enable-demos CFLAGS="-g -O2 -Werror" CPPFLAGS="-DVKD3D_SHADER_UNSUPPORTED_DXIL" && \ make -j$(nproc) && \ make -j$(nproc) check || \ touch ../pipeline_failed
From: Giovanni Mascellani gmascellani@codeweavers.com
The dxcompiler is only used for 64 bit builds, because no official 32 bit implementation is distributed. This might change in the future building the compiler ourselves and using vkd3d-shader to sign the generated shaders. --- gitlab/build-linux | 3 ++- gitlab/image.docker | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/gitlab/build-linux b/gitlab/build-linux index 9a26849ca..ee00e61ef 100755 --- a/gitlab/build-linux +++ b/gitlab/build-linux @@ -11,7 +11,8 @@ set -Eeuxo pipefail rm -fr build mkdir build cd build -../configure --enable-demos CFLAGS="-g -O2 -Werror" CPPFLAGS="-DVKD3D_SHADER_UNSUPPORTED_DXIL" && \ +export LD_LIBRARY_PATH=/usr/local/lib +../configure --enable-demos DXCOMPILER_LIBS="-L/usr/local/lib" CFLAGS="-g -O2 -Werror" CPPFLAGS="-DVKD3D_SHADER_UNSUPPORTED_DXIL" && \ make -j$(nproc) && \ make -j$(nproc) check || \ touch ../pipeline_failed diff --git a/gitlab/image.docker b/gitlab/image.docker index c85ee3e57..a83ce379e 100644 --- a/gitlab/image.docker +++ b/gitlab/image.docker @@ -15,7 +15,7 @@ RUN export DEBIAN_FRONTEND=noninteractive; \ apt-get install -y eatmydata && \ eatmydata apt-get dist-upgrade -y && \ eatmydata apt-get install -y build-essential pkg-config gcc-multilib gcc-mingw-w64 \ - autoconf automake libtool flex bison \ + autoconf automake libtool flex bison curl \ git ca-certificates rsync \ doxygen doxygen-latex graphviz \ mesa-vulkan-drivers mesa-vulkan-drivers:i386 \ @@ -36,6 +36,7 @@ RUN export DEBIAN_FRONTEND=noninteractive; \ cd ../.. && \ rm -rf wine && \ apt-get clean && \ + curl -L -s https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.7.23... | tar zx -C /usr/local ./lib/libdxcompiler.so ./lib/libdxil.so && \ groupadd host-render -g 800 && \ useradd -m gitlab -G host-render
This merge request was approved by Henri Verbeet.
Alexandre Julliard (@julliard) commented about gitlab/image.docker:
doxygen doxygen-latex graphviz \
mesa-vulkan-drivers mesa-vulkan-drivers:i386 \
vulkan-tools spirv-headers \
libvulkan-dev libvulkan-dev:i386 \
libncurses-dev libncurses-dev:i386 \
libxcb1-dev libxcb1-dev:i386 \
libxcb-util-dev libxcb-util-dev:i386 \
libxcb-icccm4-dev libxcb-icccm4-dev:i386 \
libxcb-keysyms1-dev libxcb-keysyms1-dev:i386 && \
- apt-get install -y eatmydata && \
- eatmydata apt-get dist-upgrade -y && \
- eatmydata apt-get install -y build-essential pkg-config gcc-multilib gcc-mingw-w64 \
autoconf automake libtool flex bison curl \
git ca-certificates rsync \
doxygen doxygen-latex graphviz \
mesa-vulkan-drivers mesa-vulkan-drivers:i386 \
That doesn't seem useful. If we are re-creating the docker image often enough for this to make a difference, we are doing something wrong.
On Thu Oct 12 16:26:18 2023 +0000, Alexandre Julliard wrote:
That doesn't seem useful. If we are re-creating the docker image often enough for this to make a difference, we are doing something wrong.
It's probably not particularly useful in production, but during development it can be useful to iterate a few times on the Docker script, and trimming a few minutes can be nice. On the other hand, is there a real reason for which using eatmydata is a problem?
It's probably not particularly useful in production, but during development it can be useful to iterate a few times on the Docker script, and trimming a few minutes can be nice. On the other hand, is there a real reason for which using eatmydata is a problem?
Well, it's an extra package that makes the image bigger, and it's adding some noise to the script. Nothing major of course.