mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-25 08:51:05 +01:00
[Metal] Impl Expression::Splat (#738)
* [Metal] Impl `Expression::Splat` * Add changes to the snapshots * Apply suggestions
This commit is contained in:
1 parent
a4ac7b38b2
commit
b08dfe5146
5 files changed
+17
-8
No files matched your search
+11
-2
@@ -608,8 +608,17 @@ impl<W: Write> Writer<W> {
|
||||
};
|
||||
write!(self.out, "{}", coco)?;
|
||||
}
|
||||
crate::Expression::Splat { size: _, value } => {
|
||||
self.put_expression(value, context, is_scoped)?;
|
||||
crate::Expression::Splat { size, value } => {
|
||||
let scalar_kind = match *context.resolve_type(value) {
|
||||
crate::TypeInner::Scalar { kind, .. } => kind,
|
||||
_ => return Err(Error::Validation)
|
||||
};
|
||||
let scalar = scalar_kind_string(scalar_kind);
|
||||
let size = vector_size_string(size);
|
||||
|
||||
write!(self.out, "{}{}(", scalar, size)?;
|
||||
self.put_expression(value, context, true)?;
|
||||
write!(self.out, ")")?;
|
||||
}
|
||||
crate::Expression::Compose { ty, ref components } => {
|
||||
let inner = &context.module.types[ty].inner;
|
||||
|
||||
Reference in new issue
Block a user