Skip to content

Commit

Permalink
fix for wasm32
Browse files Browse the repository at this point in the history
  • Loading branch information
mrk-its committed Nov 12, 2020
1 parent eb7bf0b commit ab76efd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/bevy_render/src/shader/shader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ impl Shader {
}
}

#[cfg(not(target_arch = "wasm32"))]
pub fn reflect_layout(&self, enforce_bevy_conventions: bool) -> Option<ShaderLayout> {
if let ShaderSource::Spirv(ref spirv) = self.source {
Some(ShaderLayout::from_spirv(
Expand All @@ -139,6 +140,11 @@ impl Shader {
panic!("Cannot reflect layout of non-SpirV shader. Try compiling this shader to SpirV first using self.get_spirv_shader()");
}
}

#[cfg(target_arch = "wasm32")]
pub fn reflect_layout(&self, _enforce_bevy_conventions: bool) -> Option<ShaderLayout> {
panic!("Cannot reflect layout on wasm32");
}
}

/// All stages in a shader program
Expand Down

0 comments on commit ab76efd

Please sign in to comment.