remove duplicate check, it's already present in Device.create_texture_view

This commit is contained in:
teoxoy 2024-07-02 16:58:40 +02:00 committed by Teodor Tanasoaia
parent dc55cb436c
commit 40022c1584
2 changed files with 0 additions and 17 deletions

View File

@ -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,

View File

@ -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,