Fix lifetime of cached textures (#4333)

* Fix in-use textures being destroyed

* Remove ImageTexture refs

* Review
This commit is contained in:
Timon
2026-07-14 13:23:31 +02:00
committed by Keavon Chambers
parent ba0a97aefe
commit 7e29fe9a31
18 changed files with 100 additions and 79 deletions

View File

@@ -50,6 +50,7 @@ struct RasterGpuToRasterCpuConverter {
height: u32,
unpadded_bytes_per_row: u32,
padded_bytes_per_row: u32,
_source: raster_types::Texture,
}
impl RasterGpuToRasterCpuConverter {
fn new(device: &wgpu::Device, encoder: &mut wgpu::CommandEncoder, data_gpu: Raster<GPU>) -> Self {
@@ -97,6 +98,8 @@ impl RasterGpuToRasterCpuConverter {
height,
unpadded_bytes_per_row,
padded_bytes_per_row,
// Keep source texture alive
_source: data_gpu.texture.clone(),
}
}