diff --git a/crates/metal2vulkan-runtime/src/render/reroute.rs b/crates/metal2vulkan-runtime/src/render/reroute.rs index e6bb5a09e..3b5b058ae 100644 --- a/crates/metal2vulkan-runtime/src/render/reroute.rs +++ b/crates/metal2vulkan-runtime/src/render/reroute.rs @@ -43,7 +43,7 @@ use crate::draw_source::{DrawSource, KeptSource}; use crate::error::Error; use crate::live_bind::LiveBind; use crate::pipeline::{GraphicsState as DrawingState, RenderPipelineState}; -use crate::render_state::EncoderState; +use crate::render_state::{EncoderState, ScissorRects}; use crate::render_target::PassShape; use crate::residency::Residency; use metal2vulkan::bind::{DrawCall, ViewSetup}; @@ -68,6 +68,9 @@ pub(super) struct Rerecord { struct Held { pipeline: Option, state: EncoderState, + /// The scissor rectangles, which live apart from `state` (`ScissorRects`): a draw recorded + /// again draws through the rectangles it was drawn through, not the encoder's latest. + scissors: ScissorRects, vertex: ArgumentTable, fragment: ArgumentTable, residency: Residency, @@ -251,6 +254,7 @@ impl RenderLowering { Held { pipeline: self.pipeline.clone(), state: self.state.clone(), + scissors: self.scissors.clone(), vertex: self.vertex.clone(), fragment: self.fragment.clone(), residency: self.residency.clone(), @@ -262,6 +266,7 @@ impl RenderLowering { fn swap_held(&mut self, held: &mut Held) { std::mem::swap(&mut self.pipeline, &mut held.pipeline); std::mem::swap(&mut *self.state, &mut held.state); + std::mem::swap(&mut self.scissors, &mut held.scissors); std::mem::swap(&mut self.vertex, &mut held.vertex); std::mem::swap(&mut self.fragment, &mut held.fragment); std::mem::swap(&mut self.residency, &mut held.residency); diff --git a/crates/metal2vulkan-validation/runtime-sources.sha256 b/crates/metal2vulkan-validation/runtime-sources.sha256 index f0185675b..9465dd235 100644 --- a/crates/metal2vulkan-validation/runtime-sources.sha256 +++ b/crates/metal2vulkan-validation/runtime-sources.sha256 @@ -1 +1 @@ -56993923af6cc7f7ffc7c97260162b0010d32ef7d63d6d7babc1f2b8565e2519 +d81a78589faa780a951157a1cb6a7e8460078be4cac6e75a18fd323ff693b3a9 diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index e0a9a6af8..e88ecdd6a 100644 --- a/crates/metal2vulkan/src/cache/mod.rs +++ b/crates/metal2vulkan/src/cache/mod.rs @@ -93,7 +93,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 500; /// changes no behaviour, and then updates that hash alone with the commit saying why, or changes /// behaviour and also bumps this version. The commit that bumps it says what changed; this comment /// keeps no history. -pub const RUNTIME_VERSION: u32 = 2016; +pub const RUNTIME_VERSION: u32 = 2017; /// The digest of the sources this build of the crate was compiled from: SHA-256, as lowercase hex, /// of the manifest, the build script, and exactly the files the crate roots' module tree compiles