mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +00:00
Add a basic test for mismatched devices (#3926)
This commit is contained in:
parent
11b8dbbea3
commit
64bf58a056
@ -9,3 +9,30 @@ fn device_initialization() {
|
||||
// intentionally empty
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn device_mismatch() {
|
||||
initialize_test(TestParameters::default().failure(), |ctx| {
|
||||
// Create a bind group uisng a lyaout from another device. This should be a validation
|
||||
// error but currently crashes.
|
||||
let (device2, _) =
|
||||
pollster::block_on(ctx.adapter.request_device(&Default::default(), None)).unwrap();
|
||||
|
||||
{
|
||||
let bind_group_layout =
|
||||
device2.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
|
||||
label: None,
|
||||
entries: &[],
|
||||
});
|
||||
|
||||
let _bind_group = ctx.device.create_bind_group(&wgpu::BindGroupDescriptor {
|
||||
label: None,
|
||||
layout: &bind_group_layout,
|
||||
entries: &[],
|
||||
});
|
||||
}
|
||||
|
||||
ctx.device.poll(wgpu::Maintain::Poll);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user