Propagate newlines correctly on error messages (#1172)

Co-authored-by: Austin Johnson <me@austinj.me>
This commit is contained in:
James 2020-01-26 05:35:49 -07:00 committed by Austin Johnson
parent 1b6a5fad7c
commit 044366a24c
2 changed files with 6 additions and 1 deletions

View File

@ -11,6 +11,7 @@
- Pipeline barriers are now correctly inserted when a resource is used more than two times.
- Update Winit to 0.20.0
- Update MacOS dependency cocoa to 0.20
- Propogate new lines correctly in shader compile errors.
- `Queue` and `QueueFamily` now implement `PartialEq` and `Eq`
# Version 0.16.0 (2019-11-01)

View File

@ -337,6 +337,10 @@ pub fn shader(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
full_include_path
}).collect::<Vec<_>>();
let content = codegen::compile(path, &root_path, &source_code, input.shader_kind, &include_paths, &input.macro_defines).unwrap();
let content = match codegen::compile(path, &root_path, &source_code, input.shader_kind, &include_paths, &input.macro_defines) {
Ok(ok) => ok,
Err(e) => panic!(e.replace("(s): ", "(s):\n"))
};
codegen::reflect("Shader", content.as_binary(), input.dump).unwrap().into()
}