Skip to content

Commit

Permalink
do not set WGPU macro
Browse files Browse the repository at this point in the history
  • Loading branch information
mrk-its committed Nov 13, 2020
1 parent 68b67a7 commit 38d93aa
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -571,15 +571,9 @@ impl RenderResourceContext for WgpuRenderResourceContext {
}

fn get_specialized_shader(&self, shader: &Shader, macros: Option<&[String]>) -> Shader {
let macros: Vec<String> = macros
.unwrap_or(&[])
.iter()
.chain((&["WGPU".to_string()]).iter())
.cloned()
.collect();
let spirv_data = match shader.source {
ShaderSource::Spirv(ref bytes) => bytes.clone(),
ShaderSource::Glsl(ref source) => glsl_to_spirv(&source, shader.stage, Some(&macros)),
ShaderSource::Glsl(ref source) => glsl_to_spirv(&source, shader.stage, macros),
};
Shader {
source: ShaderSource::Spirv(spirv_data),
Expand Down

0 comments on commit 38d93aa

Please sign in to comment.