diff options
| author | skal <pascal.massimino@gmail.com> | 2026-03-10 22:50:17 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-03-10 22:50:17 +0100 |
| commit | 2309fc50fe822a9c9ebd3013c3837cc47fb128aa (patch) | |
| tree | 2f28c762fae931229dcb30906454f03ad4b6d9dc /src | |
| parent | 58112b4fbc95d188ce2c001f84a810b2c57fe3c2 (diff) | |
fix(particles): release compute and render pass encoders
Missing wgpuComputePassEncoderRelease/wgpuRenderPassEncoderRelease
caused per-frame leaks and command buffer corruption in wgpu-native.
handoff(Gemini): particles encoder leak fixed, 2 lines added to render()
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/effects/particles_effect.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/effects/particles_effect.cc b/src/effects/particles_effect.cc index fc37a88..35caa1c 100644 --- a/src/effects/particles_effect.cc +++ b/src/effects/particles_effect.cc @@ -73,6 +73,7 @@ void Particles::render(WGPUCommandEncoder encoder, wgpuComputePassEncoderDispatchWorkgroups( compute, compute_pass_.workgroup_size_x, 1, 1); wgpuComputePassEncoderEnd(compute); + wgpuComputePassEncoderRelease(compute); // Run render pass (draw particles to output) WGPUTextureView output_view = nodes.get_view(output_nodes_[0]); @@ -91,4 +92,5 @@ void Particles::render(WGPUCommandEncoder encoder, wgpuRenderPassEncoderDraw(pass, render_pass_.vertex_count, render_pass_.instance_count, 0, 0); wgpuRenderPassEncoderEnd(pass); + wgpuRenderPassEncoderRelease(pass); } |
