From f02f0c01ea9b46b3b303c805b4e001a3f10be748 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 11 May 2023 20:18:36 +0200 Subject: Fix race condition when growing an `image::Atlas` --- wgpu/src/image/raster.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'wgpu/src/image/raster.rs') diff --git a/wgpu/src/image/raster.rs b/wgpu/src/image/raster.rs index 9b38dce4..a6cba76a 100644 --- a/wgpu/src/image/raster.rs +++ b/wgpu/src/image/raster.rs @@ -63,7 +63,6 @@ impl Cache { pub fn upload( &mut self, device: &wgpu::Device, - queue: &wgpu::Queue, encoder: &mut wgpu::CommandEncoder, handle: &image::Handle, atlas: &mut Atlas, @@ -73,8 +72,7 @@ impl Cache { if let Memory::Host(image) = memory { let (width, height) = image.dimensions(); - let entry = - atlas.upload(device, queue, encoder, width, height, image)?; + let entry = atlas.upload(device, encoder, width, height, image)?; *memory = Memory::Device(entry); } -- cgit