mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 23:05:43 +00:00
Merge pull request #297 from alexd2580/format-glsl-errors
Print formatted GLSL compile error messages
This commit is contained in:
commit
d81031696a
@ -47,7 +47,10 @@ pub fn build_glsl_shaders<'a, I>(shaders: I)
|
||||
let mut file_output = File::create(&dest.join("shaders").join(shader))
|
||||
.expect("failed to open shader output");
|
||||
|
||||
let content = glsl_to_spirv::compile(&shader_content, ty).unwrap();
|
||||
let content = match glsl_to_spirv::compile(&shader_content, ty) {
|
||||
Ok(compiled) => compiled,
|
||||
Err(message) => panic!("{}\nfailed to compile shader", message),
|
||||
};
|
||||
let output = reflect("Shader", content).unwrap();
|
||||
write!(file_output, "{}", output).unwrap();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user