Fix issue with --disassemble-entry

This commit is contained in:
khyperia 2021-06-15 09:24:00 +02:00 committed by Eduard-Mihai Burtescu
parent db5e5fd336
commit efd97e6d22

View File

@ -427,7 +427,8 @@ impl CodegenArgs {
let id = module
.entry_points
.iter()
.find(|inst| inst.operands.last().unwrap().unwrap_literal_string() == entry)
.filter(|inst| inst.class.opcode == rspirv::spirv::Op::EntryPoint)
.find(|inst| inst.operands[2].unwrap_literal_string() == entry)
.unwrap_or_else(|| {
panic!(
"no entry point with the name `{}` found in:\n{}\n",