[PATCH v3 0/4] MR390: ci: Run tests using dxcompiler.
This goes on top of !346. See [a pipeline example](https://gitlab.winehq.org/giomasce/vkd3d/-/pipelines/16064). -- v3: 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. https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/390
From: Giovanni Mascellani <gmascellani(a)codeweavers.com> --- gitlab/image.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab/image.docker b/gitlab/image.docker index dd6923cbd..ec63dee41 100644 --- a/gitlab/image.docker +++ b/gitlab/image.docker @@ -29,7 +29,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 ../.. && \ -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/390
From: Giovanni Mascellani <gmascellani(a)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; } -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/390
From: Giovanni Mascellani <gmascellani(a)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 -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/390
From: Giovanni Mascellani <gmascellani(a)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 ec63dee41..b7e40ee0e 100644 --- a/gitlab/image.docker +++ b/gitlab/image.docker @@ -14,7 +14,7 @@ RUN export DEBIAN_FRONTEND=noninteractive; \ 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 \ + autoconf automake libtool flex bison curl \ git ca-certificates rsync \ doxygen doxygen-latex graphviz \ mesa-vulkan-drivers mesa-vulkan-drivers:i386 \ @@ -35,6 +35,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 -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/390
Well, it's an extra package that makes the image bigger, and it's adding some noise to the script. Nothing major of course.
Yeah, it's not a big deal, and it makes development somewhat quicker. However, in the interest of getting things in, I removed that change. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/390#note_48625
participants (2)
-
Giovanni Mascellani -
Giovanni Mascellani (@giomasce)