fix(core): Keep surface texture alive through present preparation

This commit is contained in:
atlas authored and Teodor Tanasoaia committed 2026-04-14 10:51:03 +02:00
1 parent 2e1cc4b1a6
commit 4c61d61361
1 file changed
+4
+4
View File
@@ -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());