File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -991,6 +991,8 @@ impl<A: HalApi> Device<A> {
991
991
texture : & Arc < Texture < A > > ,
992
992
desc : & resource:: TextureViewDescriptor ,
993
993
) -> Result < Arc < TextureView < A > > , resource:: CreateTextureViewError > {
994
+ self . check_is_valid ( ) ?;
995
+
994
996
let snatch_guard = texture. device . snatchable_lock . read ( ) ;
995
997
996
998
let texture_raw = texture. try_raw ( & snatch_guard) ?;
Original file line number Diff line number Diff line change @@ -1632,6 +1632,8 @@ impl<A: HalApi> TextureView<A> {
1632
1632
#[ derive( Clone , Debug , Error ) ]
1633
1633
#[ non_exhaustive]
1634
1634
pub enum CreateTextureViewError {
1635
+ #[ error( transparent) ]
1636
+ Device ( #[ from] DeviceError ) ,
1635
1637
#[ error( "TextureId {0:?} is invalid" ) ]
1636
1638
InvalidTextureId ( TextureId ) ,
1637
1639
#[ error( transparent) ]
You can’t perform that action at this time.
0 commit comments