Actually set the SPIR-V generator magic number (#743)

wow this took a while to do
This commit is contained in:
Ashley Hauck 2021-09-01 13:32:11 +02:00 committed by GitHub
parent 032286e217
commit 71d6001bed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -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();

View File

@ -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
};