Skip to content

EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust

GPU: working textures are labelled with their size (refs #1319)

tylerjenningswec29d78ca271
diff --git a/crates/gpu/src/context.rs b/crates/gpu/src/context.rs
index 51221abc3..bd4b3c55c 100644
--- a/crates/gpu/src/context.rs
+++ b/crates/gpu/src/context.rs
@@ -850,8 +850,9 @@ impl GpuContext {
}
fn texture(&self, w: u32, h: u32) -> wgpu::Texture {
+ // Named with its size, so a GPU error about it says which texture failed (#1319).
self.device.create_texture(&wgpu::TextureDescriptor {
- label: None,
+ label: Some(&format!("working image {w}×{h}")),
size: wgpu::Extent3d { width: w.max(1), height: h.max(1), depth_or_array_layers: 1 },
mip_level_count: 1,
sample_count: 1,