(&mut self, ty: Self::Type, ptr: Self::Value, _align: Align)
| 1096 | } |
| 1097 | |
| 1098 | fn load(&mut self, ty: Self::Type, ptr: Self::Value, _align: Align) -> Self::Value { |
| 1099 | if let Some(value) = ptr.const_fold_load(self) { |
| 1100 | return value; |
| 1101 | } |
| 1102 | let ty = match self.lookup_type(ptr.ty) { |
| 1103 | SpirvType::Pointer { pointee } => { |
| 1104 | assert_ty_eq!(self, ty, pointee); |
| 1105 | pointee |
| 1106 | } |
| 1107 | ty => self.fatal(&format!( |
| 1108 | "load called on variable that wasn't a pointer: {ty:?}" |
| 1109 | )), |
| 1110 | }; |
| 1111 | self.emit() |
| 1112 | .load(ty, None, ptr.def(self), None, empty()) |
| 1113 | .unwrap() |
| 1114 | .with_type(ty) |
| 1115 | } |
| 1116 | |
| 1117 | fn volatile_load(&mut self, ty: Self::Type, ptr: Self::Value) -> Self::Value { |
| 1118 | // TODO: Implement this |
no test coverage detected