[spv-out] support function arguments as pointers

This commit is contained in:
Dzmitry Malyshau
2021-04-24 01:29:17 -04:00
parent 34b830da17
commit 77a64da189

View File

@@ -2298,6 +2298,10 @@ impl Writer {
let local_var = &function.variables[&variable];
break (local_var.id, spirv::StorageClass::Function);
}
crate::Expression::FunctionArgument(index) => {
let id = function.parameters[index as usize].result_id.unwrap();
break (id, spirv::StorageClass::Function);
}
ref other => unimplemented!("Unexpected pointer expression {:?}", other),
}
};