mirror of
https://github.com/storytold/wgpu.git
synced 2026-12-01 10:34:57 +01:00
[naga] Handle comparison operands in pipeline constant evaluation.
Properly adjust `AtomicFunction::Exchange::compare` after pipeline constant evaluation.
This commit is contained in:
1 parent
a7d8ee999d
commit
8a2bc07f11
7 files changed
+344
-1
No files matched your search
@@ -571,11 +571,26 @@ fn adjust_stmt(new_pos: &[Handle<Expression>], stmt: &mut Statement) {
|
||||
ref mut pointer,
|
||||
ref mut value,
|
||||
ref mut result,
|
||||
..
|
||||
ref mut fun,
|
||||
} => {
|
||||
adjust(pointer);
|
||||
adjust(value);
|
||||
adjust(result);
|
||||
match *fun {
|
||||
crate::AtomicFunction::Exchange {
|
||||
compare: Some(ref mut compare),
|
||||
} => {
|
||||
adjust(compare);
|
||||
}
|
||||
crate::AtomicFunction::Add
|
||||
| crate::AtomicFunction::Subtract
|
||||
| crate::AtomicFunction::And
|
||||
| crate::AtomicFunction::ExclusiveOr
|
||||
| crate::AtomicFunction::InclusiveOr
|
||||
| crate::AtomicFunction::Min
|
||||
| crate::AtomicFunction::Max
|
||||
| crate::AtomicFunction::Exchange { compare: None } => {}
|
||||
}
|
||||
}
|
||||
Statement::WorkGroupUniformLoad {
|
||||
ref mut pointer,
|
||||
|
||||
Reference in new issue
Block a user