Refactor image sampling arguments, add textureLoad support to WGSL

This commit is contained in:
Dzmitry Malyshau committed 2020-09-18 10:53:26 -04:00
1 parent 0aa91927b2
commit d25ab1b1e8
5 files changed
+64 -46

No files matched your search

+4 -2
View File
@@ -51,7 +51,7 @@ where
self.traverse_expr(sampler);
self.traverse_expr(coordinate);
match level {
crate::SampleLevel::Auto => (),
crate::SampleLevel::Auto | crate::SampleLevel::Zero => (),
crate::SampleLevel::Exact(h) | crate::SampleLevel::Bias(h) => {
self.traverse_expr(h)
}
@@ -67,7 +67,9 @@ where
} => {
self.traverse_expr(image);
self.traverse_expr(coordinate);
self.traverse_expr(index);
if let Some(index) = index {
self.traverse_expr(index);
}
}
E::Unary { expr, .. } => {
self.traverse_expr(expr);