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:
Giovanni Mascellani
2025-09-23 11:58:19 +02:00
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
15 changed files with 119 additions and 61 deletions

View File

@@ -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)

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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",

View File

@@ -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;

View File

@@ -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))

View File

@@ -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))

View File

@@ -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,
&device_info.driver_properties, 23, 3, 0))
runner->caps.tags[runner->caps.tag_count++] = "mesa<23.3";
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;

View File

@@ -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