mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Avoid leaking submitted command encoders (#5141)
* Avoid leaking submitted command encoders * changelog
This commit is contained in:
@@ -154,6 +154,7 @@ By @atlv24 in [#5383](https://github.com/gfx-rs/wgpu/pull/5383)
|
||||
- Ensure render pipelines have at least 1 target. By @ErichDonGubler in [#5715](https://github.com/gfx-rs/wgpu/pull/5715)
|
||||
- `wgpu::ComputePass` now internally takes ownership of `QuerySet` for both `wgpu::ComputePassTimestampWrites` as well as timestamp writes and statistics query, fixing crashes when destroying `QuerySet` before ending the pass. By @wumpf in [#5671](https://github.com/gfx-rs/wgpu/pull/5671)
|
||||
- Validate resources passed during compute pass recording for mismatching device. By @wumpf in [#5779](https://github.com/gfx-rs/wgpu/pull/5779)
|
||||
- Fix a `CommandBuffer` leak. By @cwfitzgerald and @nical in [#5141](https://github.com/gfx-rs/wgpu/pull/5141)
|
||||
|
||||
#### DX12
|
||||
|
||||
|
||||
@@ -2326,10 +2326,17 @@ impl crate::Context for ContextWgpuCore {
|
||||
.map(|(i, _)| i)
|
||||
.collect::<SmallVec<[_; 4]>>();
|
||||
|
||||
match wgc::gfx_select!(*queue => self.0.queue_submit(*queue, &temp_command_buffers)) {
|
||||
let index = match wgc::gfx_select!(*queue => self.0.queue_submit(*queue, &temp_command_buffers))
|
||||
{
|
||||
Ok(index) => index,
|
||||
Err(err) => self.handle_error_fatal(err, "Queue::submit"),
|
||||
};
|
||||
|
||||
for cmdbuf in &temp_command_buffers {
|
||||
wgc::gfx_select!(*queue => self.0.command_buffer_drop(*cmdbuf));
|
||||
}
|
||||
|
||||
index
|
||||
}
|
||||
|
||||
fn queue_get_timestamp_period(
|
||||
|
||||
Reference in New Issue
Block a user