mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-08-03 14:50:53 +00:00
Fix bugs
This commit is contained in:
parent
35c18d4bb9
commit
22ead3ea56
1 changed files with 24 additions and 6 deletions
|
@ -4791,6 +4791,10 @@ impl SpecialRegistersMap {
|
|||
self.reg_to_id.insert(new, id);
|
||||
id
|
||||
}
|
||||
hash_map::Entry::Vacant(e) => {
|
||||
drop(e);
|
||||
match self.reg_to_id.entry(new) {
|
||||
hash_map::Entry::Occupied(e) => *e.get(),
|
||||
hash_map::Entry::Vacant(e) => {
|
||||
let numeric_id = *current_id;
|
||||
*current_id += 1;
|
||||
|
@ -4801,6 +4805,8 @@ impl SpecialRegistersMap {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct GlobalStringIdResolver<'input> {
|
||||
current_id: spirv::Word,
|
||||
|
@ -5162,7 +5168,19 @@ impl ExpandedStatement {
|
|||
offset_src: constant_src,
|
||||
})
|
||||
}
|
||||
Statement::RepackVector(_) => todo!(),
|
||||
Statement::RepackVector(repack) => {
|
||||
let packed = f(repack.packed, !repack.is_extract);
|
||||
let unpacked = repack
|
||||
.unpacked
|
||||
.iter()
|
||||
.map(|id| f(*id, repack.is_extract))
|
||||
.collect();
|
||||
Statement::RepackVector(RepackVectorDetails {
|
||||
packed,
|
||||
unpacked,
|
||||
..repack
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue