test: Adjust some KosmicKrisp expectations

Tested with Vulkan SDK 1.4.350.0
This commit is contained in:
Andy Leiserson authored and Erich Gubler committed 2026-08-12 11:54:08 +02:00
1 parent 02ba1be5b3
commit 20e56a987d
5 files changed
+51 -54

No files matched your search

@@ -24,6 +24,10 @@ pub static TWO_BUFFERS: GpuTestConfiguration = GpuTestConfiguration::new()
.validation_error("could not be compiled into pipeline")
// https://github.com/gfx-rs/wgpu/issues/9849
.panic("assertion failed: produced"),
)
.expect_fail(
// https://github.com/gfx-rs/wgpu/issues/9849
wgpu_test::FailureCase::kosmic_krisp().panic("assertion failed: produced"),
),
)
.run_async(|ctx| {
+9
View File
@@ -171,6 +171,15 @@ impl FailureCase {
vec![f(FailureCase::molten_vk()), f(FailureCase::kosmic_krisp())]
}
/// Tests running on macOS (both Vulkan and Metal).
pub fn mac(f: impl Fn(FailureCase) -> FailureCase) -> Vec<Self> {
vec![
f(FailureCase::molten_vk()),
f(FailureCase::kosmic_krisp()),
f(FailureCase::backend(wgpu::Backends::METAL)),
]
}
pub fn lvp_poison_memory(message: &'static str) -> Self {
if let Ok("true") = std::env::var("LVP_POISON_MEMORY").as_deref() {
FailureCase {
+2 -7
View File
@@ -2,8 +2,7 @@ use std::num::NonZeroU64;
use wgpu::{util::DeviceExt, BufferUsages, PollType};
use wgpu_test::{
apply, gpu_test, FailureCase, GpuTestConfiguration, GpuTestInitializer, TestParameters,
TestingContext,
apply, gpu_test, GpuTestConfiguration, GpuTestInitializer, TestParameters, TestingContext,
};
pub fn all_tests(vec: &mut Vec<GpuTestInitializer>) {
@@ -256,11 +255,7 @@ static BIND_GROUP_NONFILTERING_LAYOUT_MIPMAP_SAMPLER: GpuTestConfiguration =
#[apply(gpu_test!)]
static BIND_GROUP_WITH_MAX_BINDING_INDEX: GpuTestConfiguration = GpuTestConfiguration::new()
.parameters(
TestParameters::default()
.limits(wgpu::Limits::downlevel_defaults())
.expect_fail(FailureCase::kosmic_krisp()), // https://github.com/gfx-rs/wgpu/issues/9187
)
.parameters(TestParameters::default().limits(wgpu::Limits::downlevel_defaults()))
.run_async(|ctx| async move {
let (device, queue) = ctx
.adapter
+18 -20
View File
@@ -68,16 +68,15 @@ static BINDING_ARRAY_STORAGE_BUFFERS: GpuTestConfiguration = GpuTestConfiguratio
max_binding_array_elements_per_shader_stage: 17,
..Limits::default()
},
// Metal: https://github.com/gfx-rs/wgpu/issues/9849
// MoltenVK: #9849 and also https://github.com/gfx-rs/wgpu/issues/6745
// With #6745 only, the expected failure was `case.panic("bad SPIR-V wrapper struct inference")`
failures: FailureCase::mac_vulkan(|case| {
case.validation_error("Shader library compile failed")
.validation_error("could not be compiled into pipeline")
})
.into_iter()
.chain([FailureCase::backend(Backends::METAL)])
.collect(),
failures: vec![
// https://github.com/gfx-rs/wgpu/issues/9849 and https://github.com/gfx-rs/wgpu/issues/6745
// Before #9849, the expected failure with #6745 only was `case.panic("bad SPIR-V wrapper struct inference")`
FailureCase::molten_vk()
.validation_error("Shader library compile failed")
.validation_error("could not be compiled into pipeline"),
// https://github.com/gfx-rs/wgpu/issues/9849
FailureCase::backend(Backends::METAL),
],
..Default::default()
})
.run_async(|ctx| async move { binding_array_buffers(ctx, BufferType::Storage, false).await });
@@ -94,16 +93,15 @@ static PARTIAL_BINDING_ARRAY_STORAGE_BUFFERS: GpuTestConfiguration = GpuTestConf
max_binding_array_elements_per_shader_stage: 33,
..Limits::default()
},
// Metal: https://github.com/gfx-rs/wgpu/issues/9849
// MoltenVK: #9849 and also https://github.com/gfx-rs/wgpu/issues/6745
// With #6745 only, the expected failure was `case.panic("bad SPIR-V wrapper struct inference")`
failures: FailureCase::mac_vulkan(|case| {
case.validation_error("Shader library compile failed")
.validation_error("could not be compiled into pipeline")
})
.into_iter()
.chain([FailureCase::backend(Backends::METAL)])
.collect(),
failures: vec![
// https://github.com/gfx-rs/wgpu/issues/9849 and https://github.com/gfx-rs/wgpu/issues/6745
// Before #9849, the expected failure with #6745 only was `case.panic("bad SPIR-V wrapper struct inference")`
FailureCase::molten_vk()
.validation_error("Shader library compile failed")
.validation_error("could not be compiled into pipeline"),
// https://github.com/gfx-rs/wgpu/issues/9849
FailureCase::backend(Backends::METAL),
],
..Default::default()
})
.run_async(|ctx| async move { binding_array_buffers(ctx, BufferType::Storage, true).await });
+18 -27
View File
@@ -11,33 +11,24 @@ const TEST_COUNT: u32 = 37;
#[apply(gpu_test!)]
static SUBGROUP_OPERATIONS: GpuTestConfiguration = GpuTestConfiguration::new()
.parameters(
TestParameters::default()
.features(wgpu::Features::SUBGROUP)
.limits(wgpu::Limits::downlevel_defaults())
// Expect metal to fail on tests involving operations in divergent control flow
//
// Newlines are included in the panic message to ensure that _additional_ failures
// are not matched against.
.expect_fail(
wgpu_test::FailureCase::molten_vk()
// 26.0 fails only test 28, and not on thread 0
.panic("thread 1 failed tests: 28,\n")
// 14.3 fails 27 and 28
.panic("thread 0 failed tests: 27,\nthread 1 failed tests: 27, 28,\n")
// Prior versions fail 27, 28, and 29
.panic("thread 0 failed tests: 27, 29,\nthread 1 failed tests: 27, 28, 29,\n"),
)
.expect_fail(
wgpu_test::FailureCase::backend(wgpu::Backends::METAL)
// 26.0 fails only test 28, and not on thread 0
.panic("thread 1 failed tests: 28,\n")
// 14.3 fails 27 and 28
.panic("thread 0 failed tests: 27,\nthread 1 failed tests: 27, 28,\n")
// Prior versions fail 27, 28, and 29
.panic("thread 0 failed tests: 27, 29,\nthread 1 failed tests: 27, 28, 29,\n"),
),
)
.parameters(TestParameters {
required_features: wgpu::Features::SUBGROUP,
required_limits: wgpu::Limits::downlevel_defaults(),
// Expect metal to fail on tests involving operations in divergent control flow
//
// Newlines are included in the panic message to ensure that _additional_ failures
// are not matched against.
failures: wgpu_test::FailureCase::mac(|case| {
case
// 26.0 fails only test 28, and not on thread 0
.panic("thread 1 failed tests: 28,\n")
// 14.3 fails 27 and 28
.panic("thread 0 failed tests: 27,\nthread 1 failed tests: 27, 28,\n")
// Prior versions fail 27, 28, and 29
.panic("thread 0 failed tests: 27, 29,\nthread 1 failed tests: 27, 28, 29,\n")
}),
..Default::default()
})
.run_sync(|ctx| {
let device = &ctx.device;