Skip to content

Commit

Permalink
Don't load compressed 3d textures
Browse files Browse the repository at this point in the history
  • Loading branch information
cohaereo committed Sep 7, 2024
1 parent 8e59d6b commit 90156e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,10 @@ impl Texture {
data: Vec<u8>,
comment: Option<String>,
) -> anyhow::Result<Texture> {
if desc.format.is_compressed() && desc.depth > 1 {
anyhow::bail!("Compressed 3D textures are not supported by wgpu");
}

let mut texture_data = data;
// Pre-multiply alpha where possible
if matches!(
Expand Down

0 comments on commit 90156e8

Please sign in to comment.