mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-30 10:03:58 +01:00
fix(core): Keep surface texture alive through present preparation
This commit is contained in:
1 parent
2e1cc4b1a6
commit
4c61d61361
1 file changed
+4
@@ -206,6 +206,10 @@ impl Queue {
|
||||
}
|
||||
}
|
||||
|
||||
// Keep the texture alive in the submission so its clear_view isn't
|
||||
// destroyed before the GPU finishes the submitted commands.
|
||||
pending_writes.insert_texture(texture);
|
||||
|
||||
// Flush pending writes through the standard submission path.
|
||||
let mut surface_textures = FastHashMap::default();
|
||||
surface_textures.insert(Arc::as_ptr(texture), texture.clone());
|
||||
|
||||
Reference in new issue
Block a user