Fix wrong interpretation of OpTypePointer

This commit is contained in:
Pierre Krieger 2016-02-05 15:23:48 +01:00
parent 61d00ce9a8
commit ec12992b23

View File

@ -202,10 +202,10 @@ fn type_from_id(doc: &parse::Spirv, searched: u32) -> String {
return format!("struct {} {{\n{}\n}}", name, members.join(",\n")); return format!("struct {} {{\n{}\n}}", name, members.join(",\n"));
}, },
&parse::Instruction::TypeOpaque { result_id, ref name } if result_id == searched => { &parse::Instruction::TypeOpaque { result_id, ref name } if result_id == searched => {
return "<opaque>".to_owned();
}, },
&parse::Instruction::TypePointer { result_id, type_id, .. } if result_id == searched => { &parse::Instruction::TypePointer { result_id, type_id, .. } if result_id == searched => {
let t = type_from_id(doc, type_id); return type_from_id(doc, type_id);
return format!("*const {}", t);
}, },
_ => () _ => ()
} }