Fix race condition when growing an image::Atlas
This commit is contained in:
parent
cf434236e7
commit
f02f0c01ea
4 changed files with 30 additions and 19 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue