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;