summaryrefslogtreecommitdiffstats
path: root/third_party/rust/naga/src/front/spv/image.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/naga/src/front/spv/image.rs')
-rw-r--r--third_party/rust/naga/src/front/spv/image.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/third_party/rust/naga/src/front/spv/image.rs b/third_party/rust/naga/src/front/spv/image.rs
index 0f25dd626b..284c4cf7fd 100644
--- a/third_party/rust/naga/src/front/spv/image.rs
+++ b/third_party/rust/naga/src/front/spv/image.rs
@@ -507,11 +507,14 @@ impl<I: Iterator<Item = u32>> super::Frontend<I> {
}
spirv::ImageOperands::CONST_OFFSET => {
let offset_constant = self.next()?;
- let offset_handle = self.lookup_constant.lookup(offset_constant)?.handle;
- let offset_handle = ctx.const_expressions.append(
- crate::Expression::Constant(offset_handle),
- Default::default(),
- );
+ let offset_expr = self
+ .lookup_constant
+ .lookup(offset_constant)?
+ .inner
+ .to_expr();
+ let offset_handle = ctx
+ .global_expressions
+ .append(offset_expr, Default::default());
offset = Some(offset_handle);
words_left -= 1;
}