Don't flip SPIR-V coordinate space on input

This commit is contained in:
Dzmitry Malyshau
2021-04-04 18:38:56 -04:00
parent 0bd8526239
commit 1dddfa6234

View File

@@ -988,8 +988,11 @@ impl<B: GfxBackend> Device<B> {
let (spv, module) = match source {
pipeline::ShaderModuleSource::SpirV(spv) => {
// Parse the given shader code and store its representation.
let parser =
naga::front::spv::Parser::new(spv.iter().cloned(), &Default::default());
let options = naga::front::spv::Options {
adjust_coordinate_space: false, // we require NDC_Y_UP feature
flow_graph_dump_prefix: None,
};
let parser = naga::front::spv::Parser::new(spv.iter().cloned(), &options);
let module = match parser.parse() {
Ok(module) => Some(module),
Err(err) => {