Skip to content

Commit e80dc8d

Browse files
Annotate expected failures on Metal, MoltenVK, and KosmicKrisp (#9188)
1 parent 3899edc commit e80dc8d

23 files changed

Lines changed: 230 additions & 68 deletions

File tree

examples/features/src/big_compute_buffers/tests.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ pub static TWO_BUFFERS: GpuTestConfiguration = GpuTestConfiguration::new()
1616
max_buffer_size: MAX_BUFFER_SIZE,
1717
max_binding_array_elements_per_shader_stage: 8,
1818
..Default::default()
19-
}),
19+
})
20+
// https://github.com/gfx-rs/wgpu/issues/9184
21+
.expect_fail(
22+
wgpu_test::FailureCase::molten_vk()
23+
.validation_error("Shader library compile failed")
24+
.validation_error("could not be compiled into pipeline"),
25+
),
2026
)
2127
.run_async(|ctx| {
2228
// The test environment's GPU reports 134MB as the max storage buffer size.https://github.com/gfx-rs/wgpu/actions/runs/11001397782/job/30546188996#step:12:1096

examples/features/src/ray_cube_compute/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,9 @@ pub static TEST: crate::framework::ExampleTestParams = crate::framework::Example
469469
width: 1024,
470470
height: 768,
471471
optional_features: wgpu::Features::default(),
472-
base_test_parameters: wgpu_test::TestParameters::default(),
472+
base_test_parameters: wgpu_test::TestParameters::default()
473+
// https://github.com/gfx-rs/wgpu/issues/9100
474+
.expect_fail(wgpu_test::FailureCase::backend(wgpu::Backends::METAL)),
473475
comparisons: &[wgpu_test::ComparisonType::Mean(0.02)],
474476
_phantom: std::marker::PhantomData::<Example>,
475477
};

examples/features/src/ray_cube_fragment/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,9 @@ pub static TEST: crate::framework::ExampleTestParams = crate::framework::Example
355355
width: 1024,
356356
height: 768,
357357
optional_features: wgpu::Features::default(),
358-
base_test_parameters: wgpu_test::TestParameters::default(),
358+
base_test_parameters: wgpu_test::TestParameters::default()
359+
// https://github.com/gfx-rs/wgpu/issues/9100
360+
.expect_fail(wgpu_test::FailureCase::backend(wgpu::Backends::METAL)),
359361
comparisons: &[wgpu_test::ComparisonType::Mean(0.02)],
360362
_phantom: std::marker::PhantomData::<Example>,
361363
};

examples/features/src/ray_scene/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,9 @@ pub static TEST: crate::framework::ExampleTestParams = crate::framework::Example
535535
width: 1024,
536536
height: 768,
537537
optional_features: wgpu::Features::default(),
538-
base_test_parameters: wgpu_test::TestParameters::default(),
538+
base_test_parameters: wgpu_test::TestParameters::default()
539+
// https://github.com/gfx-rs/wgpu/issues/9100
540+
.expect_fail(wgpu_test::FailureCase::backend(wgpu::Backends::METAL)),
539541
comparisons: &[wgpu_test::ComparisonType::Mean(0.02)],
540542
_phantom: std::marker::PhantomData::<Example>,
541543
};

examples/features/src/ray_shadows/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,9 @@ pub static TEST: crate::framework::ExampleTestParams = crate::framework::Example
352352
width: 1024,
353353
height: 768,
354354
optional_features: wgpu::Features::default(),
355-
base_test_parameters: wgpu_test::TestParameters::default(),
355+
base_test_parameters: wgpu_test::TestParameters::default()
356+
// https://github.com/gfx-rs/wgpu/issues/9100
357+
.expect_fail(wgpu_test::FailureCase::backend(wgpu::Backends::METAL)),
356358
comparisons: &[wgpu_test::ComparisonType::Mean(0.02)],
357359
_phantom: std::marker::PhantomData::<Example>,
358360
};

examples/features/src/ray_traced_triangle/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,9 @@ pub static TEST: crate::framework::ExampleTestParams = crate::framework::Example
438438
width: 1024,
439439
height: 768,
440440
optional_features: wgpu::Features::default(),
441-
base_test_parameters: wgpu_test::TestParameters::default(),
441+
base_test_parameters: wgpu_test::TestParameters::default()
442+
// https://github.com/gfx-rs/wgpu/issues/9100
443+
.expect_fail(wgpu_test::FailureCase::backend(wgpu::Backends::METAL)),
442444
comparisons: &[wgpu_test::ComparisonType::Mean(0.02)],
443445
_phantom: std::marker::PhantomData::<Example>,
444446
};

examples/features/src/texture_arrays/mod.rs

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,13 @@ pub static TEST: crate::framework::ExampleTestParams = crate::framework::Example
439439
height: 768,
440440
optional_features: wgpu::Features::empty(),
441441
base_test_parameters: wgpu_test::TestParameters::default()
442-
.instance_flags(wgpu::InstanceFlags::GPU_BASED_VALIDATION),
442+
.instance_flags(wgpu::InstanceFlags::GPU_BASED_VALIDATION)
443+
// https://github.com/gfx-rs/wgpu/issues/9184
444+
.expect_fail(
445+
wgpu_test::FailureCase::molten_vk()
446+
.validation_error("Shader library compile failed")
447+
.validation_error("could not be compiled into pipeline"),
448+
),
443449
comparisons: &[wgpu_test::ComparisonType::Mean(0.0001)],
444450
_phantom: std::marker::PhantomData::<Example>,
445451
};
@@ -454,7 +460,13 @@ pub static TEST_UNIFORM: crate::framework::ExampleTestParams =
454460
height: 768,
455461
optional_features: wgpu::Features::empty(),
456462
base_test_parameters: wgpu_test::TestParameters::default()
457-
.instance_flags(wgpu::InstanceFlags::GPU_BASED_VALIDATION),
463+
.instance_flags(wgpu::InstanceFlags::GPU_BASED_VALIDATION)
464+
// https://github.com/gfx-rs/wgpu/issues/9184
465+
.expect_fail(
466+
wgpu_test::FailureCase::molten_vk()
467+
.validation_error("Shader library compile failed")
468+
.validation_error("could not be compiled into pipeline"),
469+
),
458470
comparisons: &[wgpu_test::ComparisonType::Mean(0.0001)],
459471
_phantom: std::marker::PhantomData::<Example>,
460472
};
@@ -470,7 +482,13 @@ pub static TEST_NON_UNIFORM: crate::framework::ExampleTestParams =
470482
optional_features:
471483
wgpu::Features::SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING,
472484
base_test_parameters: wgpu_test::TestParameters::default()
473-
.instance_flags(wgpu::InstanceFlags::GPU_BASED_VALIDATION),
485+
.instance_flags(wgpu::InstanceFlags::GPU_BASED_VALIDATION)
486+
// https://github.com/gfx-rs/wgpu/issues/9184
487+
.expect_fail(
488+
wgpu_test::FailureCase::molten_vk()
489+
.validation_error("Shader library compile failed")
490+
.validation_error("could not be compiled into pipeline"),
491+
),
474492
comparisons: &[wgpu_test::ComparisonType::Mean(0.0001)],
475493
_phantom: std::marker::PhantomData::<Example>,
476494
};

tests/src/expectations.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,20 @@ impl FailureCase {
157157
}
158158
}
159159

160+
/// Tests running on the KosmicKrisp Vulkan driver on macOS.
161+
pub fn kosmic_krisp() -> Self {
162+
FailureCase {
163+
backends: Some(wgpu::Backends::VULKAN),
164+
driver: Some("KosmicKrisp"),
165+
..FailureCase::default()
166+
}
167+
}
168+
169+
/// Tests running on either Vulkan driver on macOS.
170+
pub fn mac_vulkan(f: impl Fn(FailureCase) -> FailureCase) -> Vec<Self> {
171+
vec![f(FailureCase::molten_vk()), f(FailureCase::kosmic_krisp())]
172+
}
173+
160174
/// Return the reasons why this case should fail.
161175
pub fn reasons(&self) -> &[FailureReason] {
162176
if self.reasons.is_empty() {

tests/src/native.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,23 @@ impl NativeTest {
2626
adapter_report: AdapterReport,
2727
adapter_index: usize,
2828
) -> Self {
29-
let backend = adapter_report.info.backend;
3029
let device_name = &adapter_report.info.name;
30+
let backend = adapter_report.info.backend;
31+
let driver = &adapter_report.info.driver;
32+
let report_driver_as_backend = [
33+
(wgpu::Backend::Vulkan, "MoltenVK"),
34+
(wgpu::Backend::Vulkan, "KosmicKrisp"),
35+
];
36+
let backend_str = if report_driver_as_backend.contains(&(backend, driver.as_ref())) {
37+
driver.clone()
38+
} else {
39+
format!("{backend:?}")
40+
};
3141

3242
let test_info = TestInfo::from_configuration(&config, &adapter_report);
3343

3444
let full_name = format!(
35-
"[{running_msg}] [{backend:?}/{device_name}/{adapter_index}] {base_name}",
45+
"[{running_msg}] [{backend_str}/{device_name}/{adapter_index}] {base_name}",
3646
running_msg = test_info.running_msg,
3747
base_name = config.name,
3848
);

tests/tests/wgpu-gpu/binding_array/buffers.rs

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -58,41 +58,37 @@ static PARTIAL_BINDING_ARRAY_UNIFORM_BUFFERS: GpuTestConfiguration = GpuTestConf
5858

5959
#[gpu_test]
6060
static BINDING_ARRAY_STORAGE_BUFFERS: GpuTestConfiguration = GpuTestConfiguration::new()
61-
.parameters(
62-
TestParameters::default()
63-
.instance_flags(wgpu::InstanceFlags::GPU_BASED_VALIDATION)
64-
.features(
65-
Features::BUFFER_BINDING_ARRAY
66-
| Features::STORAGE_RESOURCE_BINDING_ARRAY
67-
| Features::SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING,
68-
)
69-
.limits(Limits {
70-
max_binding_array_elements_per_shader_stage: 17,
71-
..Limits::default()
72-
})
73-
// See https://github.com/gfx-rs/wgpu/issues/6745.
74-
.expect_fail(FailureCase::molten_vk()),
75-
)
61+
.parameters(TestParameters {
62+
required_instance_flags: wgpu::InstanceFlags::GPU_BASED_VALIDATION,
63+
required_features: Features::BUFFER_BINDING_ARRAY
64+
| Features::STORAGE_RESOURCE_BINDING_ARRAY
65+
| Features::SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING,
66+
required_limits: Limits {
67+
max_binding_array_elements_per_shader_stage: 17,
68+
..Limits::default()
69+
},
70+
// See https://github.com/gfx-rs/wgpu/issues/6745.
71+
failures: FailureCase::mac_vulkan(|case| case.panic("bad SPIR-V wrapper struct inference")),
72+
..Default::default()
73+
})
7674
.run_async(|ctx| async move { binding_array_buffers(ctx, BufferType::Storage, false).await });
7775

7876
#[gpu_test]
7977
static PARTIAL_BINDING_ARRAY_STORAGE_BUFFERS: GpuTestConfiguration = GpuTestConfiguration::new()
80-
.parameters(
81-
TestParameters::default()
82-
.instance_flags(wgpu::InstanceFlags::GPU_BASED_VALIDATION)
83-
.features(
84-
Features::BUFFER_BINDING_ARRAY
85-
| Features::PARTIALLY_BOUND_BINDING_ARRAY
86-
| Features::STORAGE_RESOURCE_BINDING_ARRAY
87-
| Features::SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING,
88-
)
89-
.limits(Limits {
90-
max_binding_array_elements_per_shader_stage: 33,
91-
..Limits::default()
92-
})
93-
// See https://github.com/gfx-rs/wgpu/issues/6745.
94-
.expect_fail(FailureCase::molten_vk()),
95-
)
78+
.parameters(TestParameters {
79+
required_instance_flags: wgpu::InstanceFlags::GPU_BASED_VALIDATION,
80+
required_features: Features::BUFFER_BINDING_ARRAY
81+
| Features::PARTIALLY_BOUND_BINDING_ARRAY
82+
| Features::STORAGE_RESOURCE_BINDING_ARRAY
83+
| Features::SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING,
84+
required_limits: Limits {
85+
max_binding_array_elements_per_shader_stage: 33,
86+
..Limits::default()
87+
},
88+
// See https://github.com/gfx-rs/wgpu/issues/6745.
89+
failures: FailureCase::mac_vulkan(|case| case.panic("bad SPIR-V wrapper struct inference")),
90+
..Default::default()
91+
})
9692
.run_async(|ctx| async move { binding_array_buffers(ctx, BufferType::Storage, true).await });
9793

9894
enum BufferType {

0 commit comments

Comments
 (0)