From 1dddfa6234d5ee7cedda86c335c5d103355ba17f Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Sun, 4 Apr 2021 18:38:56 -0400 Subject: [PATCH] Don't flip SPIR-V coordinate space on input --- wgpu-core/src/device/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 7acdb4f622..543731338d 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -988,8 +988,11 @@ impl Device { 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) => {