File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,14 @@ impl DeviceExt for crate::Device {
8282 order : TextureDataOrder ,
8383 data : & [ u8 ] ,
8484 ) -> crate :: Texture {
85- // Implicitly add the COPY_DST usage
86- let mut desc = desc. to_owned ( ) ;
87- desc. usage |= crate :: TextureUsages :: COPY_DST ;
88- let texture = self . create_texture ( & desc) ;
85+ let texture = self . create_texture ( & {
86+ let mut desc = desc. to_owned ( ) ;
87+ // Implicitly add the COPY_DST usage
88+ desc. usage |= crate :: TextureUsages :: COPY_DST ;
89+ // Implicitly expand to blocksize
90+ desc. size = desc. size . physical_size ( desc. format ) ;
91+ desc
92+ } ) ;
8993
9094 // Will return None only if it's a combined depth-stencil format
9195 // If so, default to 4, validation will fail later anyway since the depth or stencil
You can’t perform that action at this time.
0 commit comments