From 58f92cc6b4e7eb179299b691baa990a89cacf91e Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Thu, 6 Oct 2022 11:06:32 -0700 Subject: [PATCH] Provoke VUID-vkDestroyDevice-device-00378 without #3069. (#3075) --- CHANGELOG.md | 6 ++++++ wgpu/tests/encoder.rs | 11 +++++++++++ wgpu/tests/root.rs | 1 + 3 files changed, 18 insertions(+) create mode 100644 wgpu/tests/encoder.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index ffc23b598..28855c766 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,12 @@ Bottom level categories: ## Unreleased +### Bug Fixes + +#### General + +- Bother to free the `hal::Api::CommandBuffer` when a `wgpu_core::command::CommandEncoder` is dropped. By @jimblandy in [#3069](https://github.com/gfx-rs/wgpu/pull/3069). + ## wgpu-0.14.0 (2022-10-05) ### Major Changes diff --git a/wgpu/tests/encoder.rs b/wgpu/tests/encoder.rs new file mode 100644 index 000000000..f722f8e34 --- /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 06a98a9ee..9151d18e9 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;