From ffbf0320bab7dce3d58455d7e7f2f43ee1ca658f Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Sat, 15 Nov 2025 18:36:39 +0100 Subject: [PATCH] tests/hlsl: Mark a denormalization mode test as todo on Intel. It behaves the same as llvmpipe. --- tests/d3d12_crosstest.h | 13 +++++++++++++ tests/hlsl/arithmetic-float-uniform.shader_test | 4 ++-- tests/shader_runner.c | 1 + tests/shader_runner.h | 1 + tests/shader_runner_d3d12.c | 3 +++ tests/shader_runner_vulkan.c | 3 +++ 6 files changed, 23 insertions(+), 2 deletions(-) diff --git a/tests/d3d12_crosstest.h b/tests/d3d12_crosstest.h index 755715502..e06f1f79f 100644 --- a/tests/d3d12_crosstest.h +++ b/tests/d3d12_crosstest.h @@ -506,6 +506,11 @@ static inline bool is_llvmpipe_device(ID3D12Device *device) return false; } +static inline bool is_intel_device(ID3D12Device *device) +{ + return false; +} + static inline bool is_nvidia_device(ID3D12Device *device) { return false; @@ -828,6 +833,14 @@ static inline bool is_llvmpipe_device(ID3D12Device *device) return properties.driverID == VK_DRIVER_ID_MESA_LLVMPIPE; } +static inline bool is_intel_device(ID3D12Device *device) +{ + VkPhysicalDeviceDriverPropertiesKHR properties; + + get_driver_properties(device, NULL, &properties); + return properties.driverID == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA; +} + static inline bool is_nvidia_device(ID3D12Device *device) { VkPhysicalDeviceDriverPropertiesKHR properties; diff --git a/tests/hlsl/arithmetic-float-uniform.shader_test b/tests/hlsl/arithmetic-float-uniform.shader_test index b402f4c74..1cbf44d5d 100644 --- a/tests/hlsl/arithmetic-float-uniform.shader_test +++ b/tests/hlsl/arithmetic-float-uniform.shader_test @@ -537,12 +537,12 @@ uint4 main() : SV_Target denorm preserve uniform 0 uint64_t2 0x0031fa182c40c60d 0 % f64(1e-307, 0) draw quad -todo(llvmpipe) probe (0, 0) u64(0x0000b8157268fdaf, 0x009c16c5c5253574) % f64(1e-309, 9.999999999999999e-306) +todo(llvmpipe | intel) probe (0, 0) u64(0x0000b8157268fdaf, 0x009c16c5c5253574) % f64(1e-309, 9.999999999999999e-306) denorm ftz uniform 0 uint64_t2 0x0031fa182c40c60d 0 % f64(1e-307, 0) draw quad -todo(llvmpipe) probe (0, 0) u64(0x0000b8157268fdaf, 0x009c16c5c5253574) % f64(1e-309, 9.999999999999999e-306) +todo(llvmpipe | intel) probe (0, 0) u64(0x0000b8157268fdaf, 0x009c16c5c5253574) % f64(1e-309, 9.999999999999999e-306) [require] shader model >= 6.2 diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 510a8bb21..8b01ccb1a 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -139,6 +139,7 @@ static const char * const shader_runner_tag_names[SHADER_RUNNER_TAG_COUNT] = [SHADER_RUNNER_TAG_D3D11] = "d3d11", [SHADER_RUNNER_TAG_D3D12] = "d3d12", [SHADER_RUNNER_TAG_GLSL] = "glsl", + [SHADER_RUNNER_TAG_INTEL] = "intel", [SHADER_RUNNER_TAG_LLVM] = "llvm", [SHADER_RUNNER_TAG_LLVMPIPE] = "llvmpipe", [SHADER_RUNNER_TAG_MESA] = "mesa", diff --git a/tests/shader_runner.h b/tests/shader_runner.h index 6c0cd7e43..72bbefd56 100644 --- a/tests/shader_runner.h +++ b/tests/shader_runner.h @@ -172,6 +172,7 @@ enum shader_runner_tag SHADER_RUNNER_TAG_D3D11, SHADER_RUNNER_TAG_D3D12, SHADER_RUNNER_TAG_GLSL, + SHADER_RUNNER_TAG_INTEL, SHADER_RUNNER_TAG_LLVM, SHADER_RUNNER_TAG_LLVMPIPE, SHADER_RUNNER_TAG_MESA, diff --git a/tests/shader_runner_d3d12.c b/tests/shader_runner_d3d12.c index bac214513..7ded64ede 100644 --- a/tests/shader_runner_d3d12.c +++ b/tests/shader_runner_d3d12.c @@ -1086,6 +1086,9 @@ static void d3d12_runner_init_caps(struct d3d12_shader_runner *runner, if (is_llvmpipe_device(device)) runner->caps.tags[SHADER_RUNNER_TAG_LLVMPIPE].present = true; + if (is_intel_device(device)) + runner->caps.tags[SHADER_RUNNER_TAG_INTEL].present = true; + runner->caps.tags[SHADER_RUNNER_TAG_MESA].present = get_mesa_device_version(device, &runner->caps.tags[SHADER_RUNNER_TAG_MESA].major, &runner->caps.tags[SHADER_RUNNER_TAG_MESA].minor, &runner->caps.tags[SHADER_RUNNER_TAG_MESA].patch); diff --git a/tests/shader_runner_vulkan.c b/tests/shader_runner_vulkan.c index 565ef1862..f76b0a73d 100644 --- a/tests/shader_runner_vulkan.c +++ b/tests/shader_runner_vulkan.c @@ -1837,6 +1837,9 @@ static bool init_vulkan_runner(struct vulkan_shader_runner *runner) if (device_info.driver_properties.driverID == VK_DRIVER_ID_MESA_LLVMPIPE) runner->caps.tags[SHADER_RUNNER_TAG_LLVMPIPE].present = true; + if (device_info.driver_properties.driverID == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA) + runner->caps.tags[SHADER_RUNNER_TAG_INTEL].present = true; + runner->caps.shader_caps[SHADER_CAP_CLIP_PLANES] = true; runner->caps.shader_caps[SHADER_CAP_FOG] = true; runner->caps.shader_caps[SHADER_CAP_POINT_SIZE] = true;