diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b0944440..18d184933 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -122,6 +122,7 @@ Bottom level categories: - Fix intermittent crashes on Linux in the `multithreaded_compute` test. By @jimblandy in [#5129](https://github.com/gfx-rs/wgpu/pull/5129). - Refactor tests to read feature flags by name instead of a hardcoded hexadecimal u64. By @rodolphito in [#5155](https://github.com/gfx-rs/wgpu/pull/5155). +- Add test that verifies that we can drop the queue before using the device to create a command encoder. By @Davidster in [#5211](https://github.com/gfx-rs/wgpu/pull/5211) ## v0.19.0 (2024-01-17) diff --git a/tests/tests/encoder.rs b/tests/tests/encoder.rs index 3487eb05d..4e0c61a89 100644 --- a/tests/tests/encoder.rs +++ b/tests/tests/encoder.rs @@ -8,6 +8,19 @@ static DROP_ENCODER: GpuTestConfiguration = GpuTestConfiguration::new().run_sync drop(encoder); }); +#[gpu_test] +static DROP_QUEUE_BEFORE_CREATING_COMMAND_ENCODER: GpuTestConfiguration = + GpuTestConfiguration::new() + .parameters(TestParameters::default().expect_fail(FailureCase::always())) + .run_sync(|ctx| { + // Use the device after the queue is dropped. Currently this panics + // but it probably shouldn't + let device = ctx.device.clone(); + drop(ctx); + let _encoder = + device.create_command_encoder(&wgpu::CommandEncoderDescriptor::default()); + }); + // This test crashes on DX12 with the exception: // // ID3D12CommandAllocator::Reset: The command allocator cannot be reset because a