diff --git a/wgpu-core/src/present.rs b/wgpu-core/src/present.rs index b12e35328..6f242cd3c 100644 --- a/wgpu-core/src/present.rs +++ b/wgpu-core/src/present.rs @@ -194,10 +194,7 @@ impl Global { let present = presentation.as_mut().unwrap(); let texture = resource::Texture::new( &device, - resource::TextureInner::Surface { - raw: ast.texture, - parent_id: surface_id, - }, + resource::TextureInner::Surface { raw: ast.texture }, hal_usage, &texture_desc, format_features, @@ -293,14 +290,9 @@ impl Global { .snatch(&mut device.snatchable_lock.write()) .unwrap() { - resource::TextureInner::Surface { raw, parent_id } => { - if surface_id != parent_id { - log::error!("Presented frame is from a different surface"); - Err(hal::SurfaceError::Lost) - } else { - unsafe { queue.raw().present(suf, raw) } - } - } + resource::TextureInner::Surface { raw } => unsafe { + queue.raw().present(suf, raw) + }, _ => unreachable!(), } } else { @@ -367,12 +359,8 @@ impl Global { .snatch(&mut device.snatchable_lock.write()) .unwrap() { - resource::TextureInner::Surface { raw, parent_id } => { - if surface_id == parent_id { - unsafe { suf.unwrap().discard_texture(raw) }; - } else { - log::warn!("Surface texture is outdated"); - } + resource::TextureInner::Surface { raw } => { + unsafe { suf.unwrap().discard_texture(raw) }; } _ => unreachable!(), } diff --git a/wgpu-core/src/resource.rs b/wgpu-core/src/resource.rs index da59357f0..5007b4561 100644 --- a/wgpu-core/src/resource.rs +++ b/wgpu-core/src/resource.rs @@ -989,7 +989,6 @@ pub(crate) enum TextureInner { }, Surface { raw: Box, - parent_id: SurfaceId, }, }