From 0ee6600dfcb30be0895b753d4338f74685048299 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Thu, 6 Oct 2022 10:34:33 -0700 Subject: [PATCH] Provoke VUID-vkDestroyDevice-device-00378 without #3069. This test should have been included in #3069. --- wgpu/tests/encoder.rs | 11 +++++++++++ wgpu/tests/root.rs | 1 + 2 files changed, 12 insertions(+) create mode 100644 wgpu/tests/encoder.rs diff --git a/wgpu/tests/encoder.rs b/wgpu/tests/encoder.rs new file mode 100644 index 00000000000..f722f8e34bd --- /dev/null +++ b/wgpu/tests/encoder.rs @@ -0,0 +1,11 @@ +use crate::common::{initialize_test, TestParameters}; + +#[test] +fn drop_encoder() { + initialize_test(TestParameters::default(), |ctx| { + let encoder = ctx + .device + .create_command_encoder(&wgpu::CommandEncoderDescriptor::default()); + drop(encoder); + }) +} diff --git a/wgpu/tests/root.rs b/wgpu/tests/root.rs index 06a98a9ee37..9151d18e9ee 100644 --- a/wgpu/tests/root.rs +++ b/wgpu/tests/root.rs @@ -5,6 +5,7 @@ mod buffer_copy; mod buffer_usages; mod clear_texture; mod device; +mod encoder; mod example_wgsl; mod instance; mod poll;