mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-21 22:34:43 +00:00
Ignore local structs that don't have Offset decorations
This commit is contained in:
parent
f6b280b115
commit
c038deec7e
@ -62,8 +62,14 @@ fn write_struct(doc: &parse::Spirv, struct_id: u32, members: &[u32]) -> String {
|
||||
};
|
||||
|
||||
None
|
||||
}).next().expect(&format!("Struct member `{}` of `{}` is missing an `Offset` decoration",
|
||||
member_name, name)) as usize;
|
||||
}).next();
|
||||
|
||||
// Some structs don't have `Offset` decorations, in the case they are used as local
|
||||
// variables only. Ignoring these.
|
||||
let spirv_offset = match spirv_offset {
|
||||
Some(o) => o as usize,
|
||||
None => return String::new()
|
||||
};
|
||||
|
||||
// We need to add a dummy field if necessary.
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user