mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
remove duplicate check, it's already present in Device.create_texture_view
This commit is contained in:
@@ -706,13 +706,6 @@ impl Global {
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
let snatch_guard = device.snatchable_lock.read();
|
||||
if let Err(e) = texture.check_destroyed(&snatch_guard) {
|
||||
break 'error e.into();
|
||||
}
|
||||
}
|
||||
|
||||
let view = match device.create_texture_view(&texture, desc) {
|
||||
Ok(view) => view,
|
||||
Err(e) => break 'error e,
|
||||
|
||||
@@ -1075,16 +1075,6 @@ impl<A: HalApi> Texture<A> {
|
||||
.ok_or_else(|| DestroyedResourceError(self.error_ident()))
|
||||
}
|
||||
|
||||
pub(crate) fn check_destroyed<'a>(
|
||||
&'a self,
|
||||
guard: &'a SnatchGuard,
|
||||
) -> Result<(), DestroyedResourceError> {
|
||||
self.inner
|
||||
.get(guard)
|
||||
.map(|_| ())
|
||||
.ok_or_else(|| DestroyedResourceError(self.error_ident()))
|
||||
}
|
||||
|
||||
pub(crate) fn inner_mut<'a>(
|
||||
&'a self,
|
||||
guard: &'a mut ExclusiveSnatchGuard,
|
||||
|
||||
Reference in New Issue
Block a user