Bad error message for trying to copy to Depth32Float format
Hello,
I am getting this error when trying to run a texture_depth_2d:
In Queue::write_texture Copying to textures with format Depth32Float and aspect All is forbidden
I changed the TextureViewDescriptor Aspect to DepthOnly without success: it seems that create_texture_with_data only accepts All in
queue.write_texture( crate::ImageCopyTexture { texture: &texture, mip_level: mip, origin: crate::Origin3d { x: 0, y: 0, z: layer, }, aspect: wgt::TextureAspect::All, }, &data[binary_offset..end_offset], crate::ImageDataLayout { offset: 0, bytes_per_row: Some(bytes_per_row), rows_per_image: Some(height_blocks), }, mip_physical, );
Is it a bug or is it impossible to create texture_depth_2d from create_texture_with_data ?
Platform
OSX, version of wgpu 0.19.3,
Thank you in advance for your help.
The error message is a bit poor, but it's indeed not possible to copy to a Depth32Float texture, see https://www.w3.org/TR/webgpu/#depth-formats
Keeping this open to track the not-so-great error
What would be an ideal wording for the error message?
given the bug description the and aspect part here was confusing. The error should bring this only up if aspects are relevant. Not sure if there's more to be done tbh