diff --git a/crates/metal2vulkan-runtime/src/render_encoder.rs b/crates/metal2vulkan-runtime/src/render_encoder.rs index 9cb6dd4d5..7d1aadc60 100644 --- a/crates/metal2vulkan-runtime/src/render_encoder.rs +++ b/crates/metal2vulkan-runtime/src/render_encoder.rs @@ -3141,15 +3141,16 @@ impl RenderCommandEncoder { // A draw that may read beyond its slots, while a declared read covers an attachment the // pass holds out of its home layout: such a read names the texture's own element, whose // layout is the home one (`Metrics::unslotted_attachment_reads`). - let pass = &self.pass; - let resolves = (pass.resolving.then(|| pass.resolves())) - .into_iter() - .flatten(); - let unslotted = (draws.reads_unbound || commands) - && (pass.targets()) + let unslotted = (draws.reads_unbound || commands) && { + let pass = &self.pass; + let resolves = (pass.resolving.then(|| pass.resolves())) + .into_iter() + .flatten(); + (pass.targets()) .map(|t| (&t.texture, t.moves())) .chain(resolves.map(|r| (&r.texture, r.moves()))) - .any(|(texture, moved)| moved && self.declared.reads(texture)); + .any(|(texture, moved)| moved && self.declared.reads(texture)) + }; let tables = &self.tables; let factors = (self.factors.as_ref()) .filter(|_| draws.patches) diff --git a/crates/metal2vulkan-runtime/src/texture.rs b/crates/metal2vulkan-runtime/src/texture.rs index c50294a38..322619876 100644 --- a/crates/metal2vulkan-runtime/src/texture.rs +++ b/crates/metal2vulkan-runtime/src/texture.rs @@ -3925,7 +3925,7 @@ impl TextureInner { /// `use_heap` declaration names. pub(crate) fn heap_block(&self) -> Option { match &self.image_of()?._under { - Some(Under::Heap { block, .. }) => Some(block.id), + Some(Under::Heap { block, .. }) => Some(block.memory.id), _ => None, } }