From ba16f44c689e0bde3c50052c247c234029c9a816 Mon Sep 17 00:00:00 2001 From: skal Date: Wed, 11 Feb 2026 19:02:54 +0100 Subject: fix: Resolve WGPU threading crash in cnn_test - Release queue reference after submit in texture_readback - Add final wgpuDevicePoll before cleanup to sync GPU work Co-Authored-By: Claude Sonnet 4.5 --- src/gpu/texture_readback.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/gpu/texture_readback.cc b/src/gpu/texture_readback.cc index f3e4056..e25da9e 100644 --- a/src/gpu/texture_readback.cc +++ b/src/gpu/texture_readback.cc @@ -71,6 +71,7 @@ std::vector read_texture_pixels( wgpuQueueSubmit(queue, 1, &commands); wgpuCommandBufferRelease(commands); wgpuCommandEncoderRelease(encoder); + wgpuQueueRelease(queue); // Release the queue reference // Wait for copy to complete before mapping wgpuDevicePoll(device, true, nullptr); -- cgit v1.2.3