-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
do not depend on spirv on wasm target (#689)
do not use spirv for wasm target
- Loading branch information
Showing
6 changed files
with
69 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
#[allow(clippy::module_inception)] | ||
mod shader; | ||
mod shader_defs; | ||
|
||
#[cfg(not(target_arch = "wasm32"))] | ||
mod shader_reflect; | ||
|
||
#[cfg(target_arch = "wasm32")] | ||
#[path = "shader_reflect_wasm.rs"] | ||
mod shader_reflect; | ||
|
||
pub use shader::*; | ||
pub use shader_defs::*; | ||
pub use shader_reflect::*; | ||
|
||
use crate::pipeline::{BindGroupDescriptor, VertexBufferDescriptor}; | ||
|
||
/// Defines the memory layout of a shader | ||
#[derive(Debug, Clone, PartialEq, Eq)] | ||
pub struct ShaderLayout { | ||
pub bind_groups: Vec<BindGroupDescriptor>, | ||
pub vertex_buffer_descriptors: Vec<VertexBufferDescriptor>, | ||
pub entry_point: String, | ||
} | ||
|
||
pub const GL_VERTEX_INDEX: &str = "gl_VertexIndex"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
use crate::shader::ShaderLayout; | ||
|
||
impl ShaderLayout { | ||
pub fn from_spirv(_spirv_data: &[u32], _bevy_conventions: bool) -> ShaderLayout { | ||
panic!("reflecting shader layout from spirv data is not available"); | ||
} | ||
} |