mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
ci: Run Linux tests on Debian trixie.
So we have a more recent version of SPIRV-Tools and also don't have to recompile Mesa to test llvmpipe. This fixes a few failing tests, but also breaks a couple.
This commit is contained in:
committed by
Henri Verbeet
parent
3f1de27283
commit
3c8b4ce731
Notes:
Henri Verbeet
2025-10-03 00:55:50 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1764
@@ -6,7 +6,7 @@ These scripts are used by the GitLab CI feature to automatically run
|
||||
the vkd3d tests on each merge request.
|
||||
|
||||
The CI target image-linux, in the file image.yml, builds a Docker
|
||||
image based on Debian bookworm with all the packages required for
|
||||
image based on Debian trixie with all the packages required for
|
||||
testing, and uploads it to the GitLab container registry. The Docker
|
||||
script is in the file image.docker. Most of the dependencies are
|
||||
installed directly from the Debian repositories, with a few
|
||||
@@ -19,11 +19,7 @@ exceptions:
|
||||
* SPIRV-Tools are recompiled from sources, because the packages in
|
||||
Debian do not ship shared objects and are not multiarch-compatible;
|
||||
in order to make the packages multiarch-compatible, the utilities
|
||||
are dropped (they're not used by the CI anyway);
|
||||
|
||||
* llvmpipe from Mesa 24.0.1 is compiled (in addition to version
|
||||
22.3.6 available in Debian bookworm), because some Vulkan features
|
||||
required by vkd3d are not available in Mesa 22.3.6.
|
||||
are dropped (they're not used by the CI anyway).
|
||||
|
||||
The file build.yml contains the actual testing targets. Currently
|
||||
vkd3d is tested on Linux, on x86-64 and i386, each architecture with
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
stage: build
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
image: $CI_REGISTRY/wine/vkd3d:debian-bookworm
|
||||
image: $CI_REGISTRY/wine/vkd3d:debian-trixie
|
||||
interruptible: true
|
||||
needs:
|
||||
- job: image-linux
|
||||
@@ -36,9 +36,6 @@ build-radv-64:
|
||||
|
||||
build-llvmpipe-64:
|
||||
extends: .build-linux
|
||||
allow_failure:
|
||||
exit_codes:
|
||||
- 2
|
||||
variables:
|
||||
VK_LOADER_DRIVERS_SELECT: 'lvp_*'
|
||||
VKD3D_SHADER_CONFIG: 'force_validation'
|
||||
@@ -56,29 +53,17 @@ build-radv-32:
|
||||
|
||||
build-llvmpipe-32:
|
||||
extends: .build-linux
|
||||
allow_failure:
|
||||
exit_codes:
|
||||
- 2
|
||||
variables:
|
||||
VK_LOADER_DRIVERS_SELECT: 'lvp_*'
|
||||
CC: 'i686-linux-gnu-gcc'
|
||||
VKD3D_SHADER_CONFIG: 'force_validation'
|
||||
VKD3D_TEST_DEBUG: '1'
|
||||
|
||||
build-llvmpipe-64-mesa24:
|
||||
extends: .build-linux
|
||||
variables:
|
||||
VK_DRIVER_FILES: '/opt/mesa24/share/vulkan/icd.d/lvp_icd.x86_64.json'
|
||||
LD_LIBRARY_PATH: '/opt/mesa24/lib/x86_64-linux-gnu'
|
||||
__EGL_VENDOR_LIBRARY_FILENAMES: '/opt/mesa24/share/glvnd/egl_vendor.d/50_mesa.json'
|
||||
VKD3D_SHADER_CONFIG: 'force_validation'
|
||||
VKD3D_TEST_DEBUG: '1'
|
||||
|
||||
build-crosstest:
|
||||
stage: build
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
image: $CI_REGISTRY/wine/vkd3d:debian-bookworm
|
||||
image: $CI_REGISTRY/wine/vkd3d:debian-trixie
|
||||
interruptible: true
|
||||
needs:
|
||||
- job: image-linux
|
||||
@@ -104,7 +89,7 @@ build-crosstest:
|
||||
stage: build
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
image: $CI_REGISTRY/wine/vkd3d:debian-bookworm
|
||||
image: $CI_REGISTRY/wine/vkd3d:debian-trixie
|
||||
interruptible: true
|
||||
needs:
|
||||
- job: image-linux
|
||||
|
||||
@@ -8,12 +8,6 @@ WORKDIR /tmp
|
||||
# we also have to drop the executables, but we don't care about those
|
||||
# anyway.
|
||||
|
||||
# Mesa requires Meson >= 1.1.0, which is not available on Debian bookworm.
|
||||
# Fortunately that can be worked around by removing some features from
|
||||
# meson.build, which are not needed for llvmpipe. Notice that we use
|
||||
# "git show | patch -R" instead of "git revert" so we don't have to configure
|
||||
# a valid email and user name for git.
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive; \
|
||||
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 && \
|
||||
@@ -29,8 +23,6 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
|
||||
apt-get install -y build-essential pkg-config gcc-mingw-w64 crossbuild-essential-i386 \
|
||||
mingw-w64-tools autoconf automake libtool flex bison curl \
|
||||
git ca-certificates rsync \
|
||||
llvm-15-dev meson ninja-build python3-mako \
|
||||
zlib1g-dev libexpat-dev libdrm-dev libglvnd-dev \
|
||||
doxygen doxygen-latex graphviz \
|
||||
mesa-vulkan-drivers mesa-vulkan-drivers:i386 \
|
||||
vulkan-tools spirv-headers \
|
||||
@@ -77,17 +69,6 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
|
||||
dpkg -i spirv-tools_*.deb && \
|
||||
rm -fr * && \
|
||||
|
||||
git clone --branch mesa-24.2.4 https://gitlab.freedesktop.org/mesa/mesa.git && \
|
||||
cd mesa && \
|
||||
git show 876db9135048 | patch -p1 -R && \
|
||||
sed -i -e '981,991d' meson.build && \
|
||||
mkdir build && \
|
||||
cd build && \
|
||||
meson setup --buildtype release -Dprefix=/opt/mesa24 -Dplatforms= -Dvideo-codecs= -Dvulkan-drivers=swrast -Dgallium-drivers=swrast -Dopengl=true -Degl=enabled -Dglvnd=true -Dshared-glapi=enabled -Dglx=disabled -Dgles1=disabled -Dgles2=disabled .. && \
|
||||
meson install && \
|
||||
cd ../.. && \
|
||||
rm -fr mesa && \
|
||||
|
||||
apt-get clean && \
|
||||
curl -L -s https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.8.2502/linux_dxc_2025_02_20.x86_64.tar.gz | tar zx -C /usr/local ./lib/libdxcompiler.so ./lib/libdxil.so && \
|
||||
groupadd host-render -g 800 && \
|
||||
|
||||
@@ -10,8 +10,8 @@ image-linux:
|
||||
name: gcr.io/kaniko-project/executor:debug
|
||||
entrypoint: [""]
|
||||
variables:
|
||||
IMAGE_SOURCE: "$CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX/debian:bookworm"
|
||||
IMAGE_LOCAL: "$CI_REGISTRY_IMAGE:debian-bookworm"
|
||||
IMAGE_SOURCE: "$CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX/debian:trixie"
|
||||
IMAGE_LOCAL: "$CI_REGISTRY_IMAGE:debian-trixie"
|
||||
DOCKER_FILE: "$CI_PROJECT_DIR/gitlab/image.docker"
|
||||
script:
|
||||
- mkdir -p /kaniko/.docker
|
||||
|
||||
@@ -548,6 +548,11 @@ static inline bool is_mvk_device_lt(ID3D12Device *device, uint32_t major, uint32
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool is_mesa_device_with_llvm_ge(ID3D12Device *device, uint32_t major, uint32_t minor, uint32_t patch)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool is_macos_lt(unsigned int major, unsigned int minor, unsigned int patch)
|
||||
{
|
||||
return false;
|
||||
@@ -908,6 +913,16 @@ static inline bool is_mvk_device_lt(ID3D12Device *device, uint32_t major, uint32
|
||||
return device_properties.driverVersion < MVK_MAKE_API_VERSION(major, minor, patch);
|
||||
}
|
||||
|
||||
static inline bool is_mesa_device_with_llvm_ge(ID3D12Device *device, uint32_t major, uint32_t minor, uint32_t patch)
|
||||
{
|
||||
VkPhysicalDeviceDriverPropertiesKHR driver_properties;
|
||||
VkPhysicalDeviceProperties device_properties;
|
||||
|
||||
get_driver_properties(device, &device_properties, &driver_properties);
|
||||
return is_mesa_vulkan_driver(&driver_properties)
|
||||
&& compare_version_string_ge(device_properties.deviceName, "LLVM ", 16, 0 ,0);
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
static inline bool is_macos_lt(unsigned int major, unsigned int minor, unsigned int patch)
|
||||
|
||||
@@ -41,10 +41,10 @@ float4 main(float4 pos : SV_Position, uint sample_idx : SV_SampleIndex) : SV_Tar
|
||||
[test]
|
||||
clear rtv 0 1.0 1.0 1.0 1.0
|
||||
todo(msl & sm>=6) draw triangle list 3
|
||||
todo(vulkan | opengl | d3d12) probe ( 0, 0) rgba(0.25, 0.25, 0.25, 0.25)
|
||||
todo(vulkan | opengl | d3d12) probe (639, 0) rgba(0.0, 0.0, 0.0, 0.0)
|
||||
todo(vulkan | opengl | d3d12) probe ( 0, 479) rgba(0.25, 0.25, 0.25, 0.25)
|
||||
todo(vulkan | opengl | d3d12) probe (639, 479) rgba(0.0, 0.0, 0.0, 0.0)
|
||||
todo(vulkan | opengl & llvmpipe | d3d12) probe ( 0, 0) f32(0.25, 0.25, 0.25, 0.25)
|
||||
todo(vulkan | opengl & llvmpipe | d3d12) probe (639, 0) f32(0.0, 0.0, 0.0, 0.0)
|
||||
todo(vulkan | opengl & llvmpipe | d3d12) probe ( 0, 479) f32(0.25, 0.25, 0.25, 0.25)
|
||||
todo(vulkan | opengl & llvmpipe | d3d12) probe (639, 479) f32(0.0, 0.0, 0.0, 0.0)
|
||||
|
||||
% Centroid interpolation, which means the pixel center if all samples are
|
||||
% covered and the first covered sample if a least a sample is not covered (in
|
||||
@@ -73,10 +73,10 @@ float4 main(centroid float4 pos : SV_Position, uint sample_idx : SV_SampleIndex)
|
||||
[test]
|
||||
clear rtv 0 1.0 1.0 1.0 1.0
|
||||
todo(glsl | msl & sm>=6) draw triangle list 3
|
||||
todo probe ( 0, 0) rgba(0.25, 0.25, 0.25, 0.25)
|
||||
todo(vulkan | opengl | d3d12) probe (638, 0) rgba(0.0, 0.0, 0.0, 0.0)
|
||||
todo probe ( 0, 478) rgba(0.25, 0.25, 0.25, 0.25)
|
||||
todo(vulkan | opengl | d3d12) probe (639, 479) rgba(0.0, 0.0, 0.0, 0.0)
|
||||
todo probe ( 0, 0) f32(0.25, 0.25, 0.25, 0.25)
|
||||
todo(vulkan | opengl & llvmpipe | d3d12) probe (638, 0) f32(0.0, 0.0, 0.0, 0.0)
|
||||
todo probe ( 0, 478) f32(0.25, 0.25, 0.25, 0.25)
|
||||
todo(vulkan | opengl & llvmpipe | d3d12) probe (639, 479) f32(0.0, 0.0, 0.0, 0.0)
|
||||
|
||||
% Sample interpolation.
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ if(sm>=4) probe (0, 0) f32(129, 0.785398185, 0, 0)
|
||||
% Subnormals.
|
||||
uniform 0 uint4 0x0007ffff 0 0 0
|
||||
todo(sm<4) draw quad
|
||||
probe (0, 0) f32(0, 0, 0, 0)
|
||||
bug(llvmpipe & llvm>=16) probe (0, 0) f32(0, 0, 0, 0)
|
||||
|
||||
[pixel shader]
|
||||
float4 main() : sv_target
|
||||
|
||||
@@ -300,7 +300,10 @@ probe (0, 0) rgba (0.3, 0.3, 0.6, 0.6) 1
|
||||
|
||||
uniform 8 float4 0.5 0.0 0.0 0.0
|
||||
todo(sm<4) draw quad
|
||||
probe (0, 0) rgba (0.3, 0.5, 0.6, 0.6) 1
|
||||
% Apparently fixed by Mesa commit 9785fa460c41b9498c24a82b98069655a91224c5,
|
||||
% which only adds optimization; so it might just be hiding the bug rather than
|
||||
% solving it; see also https://gitlab.freedesktop.org/mesa/mesa/-/issues/13092
|
||||
bug(mesa<25.1 & llvm>=16) probe (0, 0) f32(0.3, 0.5, 0.6, 0.6) 1
|
||||
|
||||
uniform 0 float4 1.0 0.0 0.0 0.0
|
||||
todo(sm<4) draw quad
|
||||
|
||||
@@ -253,4 +253,7 @@ probe (0, 0) rgba (0.4, 0.4, 0.4, 0.4) 1
|
||||
|
||||
uniform 4 float4 2.0 0.0 0.0 0.0
|
||||
todo(sm<4) draw quad
|
||||
probe (0, 0) rgba (0.9, 0.9, 0.9, 0.9) 1
|
||||
% Apparently fixed by Mesa commit 9785fa460c41b9498c24a82b98069655a91224c5,
|
||||
% which only adds optimization; so it might just be hiding the bug rather than
|
||||
% solving it; see also https://gitlab.freedesktop.org/mesa/mesa/-/issues/13092
|
||||
bug(mesa<25.1 & llvm>=16) probe (0, 0) f32(0.9, 0.9, 0.9, 0.9) 1
|
||||
|
||||
@@ -154,8 +154,10 @@ static bool check_qualifier_args_conjunction(struct shader_runner *runner,
|
||||
"d3d11",
|
||||
"d3d12",
|
||||
"glsl",
|
||||
"llvm>=16",
|
||||
"llvmpipe",
|
||||
"mesa<23.3",
|
||||
"mesa<25.1",
|
||||
"msl",
|
||||
"mvk<1.2.11",
|
||||
"mvk",
|
||||
|
||||
@@ -168,7 +168,7 @@ struct shader_runner_caps
|
||||
{
|
||||
const char *runner;
|
||||
const char *compiler;
|
||||
const char *tags[4];
|
||||
const char *tags[6];
|
||||
size_t tag_count;
|
||||
enum shader_model minimum_shader_model;
|
||||
enum shader_model maximum_shader_model;
|
||||
|
||||
@@ -1135,6 +1135,10 @@ static void d3d12_runner_init_caps(struct d3d12_shader_runner *runner,
|
||||
runner->caps.tags[runner->caps.tag_count++] = "llvmpipe";
|
||||
if (is_mesa_device_lt(device, 23, 3, 0))
|
||||
runner->caps.tags[runner->caps.tag_count++] = "mesa<23.3";
|
||||
if (is_mesa_device_lt(device, 25, 1, 0))
|
||||
runner->caps.tags[runner->caps.tag_count++] = "mesa<25.1";
|
||||
if (is_mesa_device_with_llvm_ge(device, 16, 0, 0))
|
||||
runner->caps.tags[runner->caps.tag_count++] = "llvm>=16";
|
||||
if (test_options.use_warp_device)
|
||||
runner->caps.tags[runner->caps.tag_count++] = "warp";
|
||||
if (is_nvidia_windows_device(device) || is_nvidia_device(device))
|
||||
|
||||
@@ -247,6 +247,16 @@ static uint32_t get_format_support(struct gl_runner *runner, enum DXGI_FORMAT fo
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool check_mesa_version_lt(unsigned int major, unsigned int minor, unsigned int patch)
|
||||
{
|
||||
return compare_version_string_lt((const char *)glGetString(GL_VERSION), "Mesa ", major, minor, patch);
|
||||
}
|
||||
|
||||
static bool check_llvm_version_ge(unsigned int major, unsigned int minor, unsigned int patch)
|
||||
{
|
||||
return compare_version_string_ge((const char *)glGetString(GL_RENDERER), "LLVM ", major, minor, patch);
|
||||
}
|
||||
|
||||
static bool gl_runner_init(struct gl_runner *runner, enum shading_language language)
|
||||
{
|
||||
PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT;
|
||||
@@ -374,6 +384,10 @@ static bool gl_runner_init(struct gl_runner *runner, enum shading_language langu
|
||||
runner->caps.tags[runner->caps.tag_count++] = "glsl";
|
||||
if (strncmp((const char *)glGetString(GL_RENDERER), "llvmpipe ", 9) == 0)
|
||||
runner->caps.tags[runner->caps.tag_count++] = "llvmpipe";
|
||||
if (check_mesa_version_lt(25, 1, 0))
|
||||
runner->caps.tags[runner->caps.tag_count++] = "mesa<25.1";
|
||||
if (check_llvm_version_ge(16, 0, 0))
|
||||
runner->caps.tags[runner->caps.tag_count++] = "llvm>=16";
|
||||
|
||||
glGetIntegerv(GL_NUM_EXTENSIONS, &extension_count);
|
||||
if (check_gl_extension("GL_ARB_internalformat_query2", extension_count))
|
||||
|
||||
@@ -1789,10 +1789,18 @@ static bool init_vulkan_runner(struct vulkan_shader_runner *runner)
|
||||
{
|
||||
if (device_info.driver_properties.driverID == VK_DRIVER_ID_MESA_LLVMPIPE)
|
||||
runner->caps.tags[runner->caps.tag_count++] = "llvmpipe";
|
||||
if (is_mesa_vulkan_driver(&device_info.driver_properties)
|
||||
&& !is_vulkan_driver_version_ge(&device_info.properties2.properties,
|
||||
if (is_mesa_vulkan_driver(&device_info.driver_properties))
|
||||
{
|
||||
if (!is_vulkan_driver_version_ge(&device_info.properties2.properties,
|
||||
&device_info.driver_properties, 23, 3, 0))
|
||||
runner->caps.tags[runner->caps.tag_count++] = "mesa<23.3";
|
||||
if (!is_vulkan_driver_version_ge(&device_info.properties2.properties,
|
||||
&device_info.driver_properties, 25, 1, 0))
|
||||
runner->caps.tags[runner->caps.tag_count++] = "mesa<25.1";
|
||||
if (compare_version_string_ge(device_info.properties2.properties.deviceName,
|
||||
"LLVM ", 16, 0 ,0))
|
||||
runner->caps.tags[runner->caps.tag_count++] = "llvm>=16";
|
||||
}
|
||||
}
|
||||
|
||||
runner->caps.shader_caps[SHADER_CAP_CLIP_PLANES] = true;
|
||||
|
||||
@@ -702,4 +702,51 @@ static inline IDxcCompiler3 *dxcompiler_create(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int compare_versions(uint32_t major1, uint32_t minor1, uint32_t patch1,
|
||||
uint32_t major2, uint32_t minor2, uint32_t patch2)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((ret = vkd3d_u32_compare(major1, major2)))
|
||||
return ret;
|
||||
if ((ret = vkd3d_u32_compare(minor1, minor2)))
|
||||
return ret;
|
||||
return vkd3d_u32_compare(patch1, patch2);
|
||||
}
|
||||
|
||||
static inline bool find_version_string(const char *str, const char *tag,
|
||||
uint32_t *major, uint32_t *minor, uint32_t *patch)
|
||||
{
|
||||
const char *ptr;
|
||||
|
||||
if (!(ptr = strstr(str, tag)))
|
||||
return false;
|
||||
|
||||
ptr += strlen(tag);
|
||||
|
||||
return 3 == sscanf(ptr, "%u.%u.%u", major, minor, patch);
|
||||
}
|
||||
|
||||
static inline bool compare_version_string_lt(const char *str, const char *tag,
|
||||
uint32_t major, uint32_t minor, uint32_t patch)
|
||||
{
|
||||
uint32_t major2, minor2, patch2;
|
||||
|
||||
if (!find_version_string(str, tag, &major2, &minor2, &patch2))
|
||||
return false;
|
||||
|
||||
return compare_versions(major, minor, patch, major2, minor2, patch2) > 0;
|
||||
}
|
||||
|
||||
static inline bool compare_version_string_ge(const char *str, const char *tag,
|
||||
uint32_t major, uint32_t minor, uint32_t patch)
|
||||
{
|
||||
uint32_t major2, minor2, patch2;
|
||||
|
||||
if (!find_version_string(str, tag, &major2, &minor2, &patch2))
|
||||
return false;
|
||||
|
||||
return compare_versions(major, minor, patch, major2, minor2, patch2) <= 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user