mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
remove duplicate check, it's already present in Device.create_texture_view
This commit is contained in:
parent
dc55cb436c
commit
40022c1584
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user