Skip to content

Commit

Permalink
Actually set the SPIR-V generator magic number (#743)
Browse files Browse the repository at this point in the history
wow this took a while to do
  • Loading branch information
khyperia authored Sep 1, 2021
1 parent 032286e commit 71d6001
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/rustc_codegen_spirv/src/builder_spirv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ impl BuilderSpirv {

let mut builder = Builder::new();
builder.set_version(version.0, version.1);
builder.module_mut().header.as_mut().unwrap().generator = 0x001B_0000;

let mut enabled_capabilities = FxHashSet::default();
let mut enabled_extensions = FxHashSet::default();
Expand Down
1 change: 1 addition & 0 deletions crates/rustc_codegen_spirv/src/linker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ pub fn link(sess: &Session, mut inputs: Vec<Module>, opts: &Options) -> Result<L
let mut output = loader.module();
let mut header = ModuleHeader::new(bound + 1);
header.set_version(version.0, version.1);
header.generator = 0x001B_0000;
output.header = Some(header);
output
};
Expand Down

0 comments on commit 71d6001

Please sign in to comment.