From 463df8e1ea4b582473193ef0f588816775c45951 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Sat, 20 Sep 2025 22:52:58 +0200 Subject: [PATCH] tests/hlsl: Skip a shader model 6 floating-point comparison test on Windows NVIDIA. --- tests/hlsl/float-comparison.shader_test | 3 ++- tests/shader_runner.c | 1 + tests/shader_runner.h | 2 +- tests/shader_runner_d3d12.c | 6 ++++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/hlsl/float-comparison.shader_test b/tests/hlsl/float-comparison.shader_test index df5d8007b..d7342f042 100644 --- a/tests/hlsl/float-comparison.shader_test +++ b/tests/hlsl/float-comparison.shader_test @@ -61,7 +61,8 @@ if(sm<4) todo probe (0,0) rgba (1010101.0, 11001100.0, 1101001.0, 11.0) % SM4-5 optimises away the 'not' by inverting the condition, even though this is invalid for NaN. if(sm>=4 & sm<6) todo probe (0,0) rgba (1010101.0, 0.0, 1101001.0, 1.0) % SM6 emits the correct ordered/unordered instructions, so comparisons are false for NaN, and are made true with 'not'. -if(sm>=6) probe (0,0) rgba (1010101.0, 11110000.0, 1101001.0, 1.0) +% However the Windows NVIDIA driver incorrectly evalutes ord(NaN, ...). +if(sm>=6 & !windows | sm>=6 & !nvidia) probe (0,0) f32(1010101.0, 11110000.0, 1101001.0, 1.0) % In shader model 2.0, native compares two numbers for equality checking if (a - b)*(a - b) is diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 20ab05880..4ac69da41 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -163,6 +163,7 @@ static bool check_qualifier_args_conjunction(struct shader_runner *runner, "opengl", "vulkan", "warp", + "windows", }; bool holds = true; diff --git a/tests/shader_runner.h b/tests/shader_runner.h index c195bfe8c..71b19a680 100644 --- a/tests/shader_runner.h +++ b/tests/shader_runner.h @@ -168,7 +168,7 @@ struct shader_runner_caps { const char *runner; const char *compiler; - const char *tags[3]; + const char *tags[4]; size_t tag_count; enum shader_model minimum_shader_model; enum shader_model maximum_shader_model; diff --git a/tests/shader_runner_d3d12.c b/tests/shader_runner_d3d12.c index e4debd681..f5d8b4950 100644 --- a/tests/shader_runner_d3d12.c +++ b/tests/shader_runner_d3d12.c @@ -1137,8 +1137,14 @@ static void d3d12_runner_init_caps(struct d3d12_shader_runner *runner, runner->caps.tags[runner->caps.tag_count++] = "mesa<23.3"; if (test_options.use_warp_device) runner->caps.tags[runner->caps.tag_count++] = "warp"; + if (is_nvidia_windows_device(device) || is_nvidia_device(device)) + runner->caps.tags[runner->caps.tag_count++] = "nvidia"; } +#ifdef _WIN32 + runner->caps.tags[runner->caps.tag_count++] = "windows"; +#endif + for (unsigned int i = 0; i < ARRAY_SIZE(formats); ++i) { runner->caps.format_caps[formats[i]] = get_format_support(device, formats[i]);