1305: Don't flip SPIR-V coordinate space on input r=kvark a=kvark

**Connections**
fixes https://github.com/gfx-rs/wgpu-rs/issues/842

**Description**
The SPV-in by default changes the coordinate space, but for WebGPU we don't want it.

**Testing**
Untested...

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This commit is contained in:
bors[bot] 2021-04-04 22:42:24 +00:00 committed by GitHub
commit 31f52202c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -988,8 +988,11 @@ impl<B: GfxBackend> Device<B> {
let (spv, module) = match source { let (spv, module) = match source {
pipeline::ShaderModuleSource::SpirV(spv) => { pipeline::ShaderModuleSource::SpirV(spv) => {
// Parse the given shader code and store its representation. // Parse the given shader code and store its representation.
let parser = let options = naga::front::spv::Options {
naga::front::spv::Parser::new(spv.iter().cloned(), &Default::default()); 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() { let module = match parser.parse() {
Ok(module) => Some(module), Ok(module) => Some(module),
Err(err) => { Err(err) => {