Merge PR #13: a draw recorded again draws through its own scissor rectangles
Merges steelbrain/metal2vulkan#13 (54cc4f817c, two commits on963f0e64f1) into development as a merge commit, on the owner's request (11-11) that GitHub count the PR as merged; the PR's commits keep their ids. The fix: render/reroute.rs's Held, the encoder's state kept for a draw recorded again into a new pass instance, carries the encoder's scissor rectangles beside EncoderState and swaps them in and out with it. Without it a rerouted pass's earlier draws took the encoder's latest rectangles. Conflicts resolved: RUNTIME_VERSION is 2017 (development held 2016; the PR's 1776 bump was against its 11-05 base), and the runtime-sources pin is recomputed over the merged tree (pin-compute.py). Verified here: the conflicts and the pin only. Build, clippy and the runtime suites run on development after the merge.
This commit is contained in:
commit
cfe05d0655
3 files changed
+8
-3
No files matched your search
@@ -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<RenderPipelineState>,
|
||||
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);
|
||||
|
||||
@@ -1 +1 @@
|
||||
56993923af6cc7f7ffc7c97260162b0010d32ef7d63d6d7babc1f2b8565e2519
|
||||
d81a78589faa780a951157a1cb6a7e8460078be4cac6e75a18fd323ff693b3a9
|
||||
Vendored
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user