A recovery carries drawing and mesh pipeline states
What: a drawing state (a mesh one, and a twin of a color group, a single-sample or a factor-scaling state among them) keeps a chain of programs per generation as a compute state does (pipeline/carry.rs): its StateShared Deref reaches the program of the generation whose command buffer's work the thread does, else the last; its ID, uniqueIdentifier, label and sampler numbers stay. Each state is kept by its generation's carry registry (GraphicsState::kept at the end of a render or mesh creation, with its color groups' twins); the recovery carries them after the compute states (pipeline/render/carry.rs): its base variant, and its large-buffer form's, made again from the pipelines its creation compiled or the live variants of them the new generation holds, no translation; then, under the new generation's reach (NoticesFor::of_generation), its neutrals, its predicted first draw's VkPipeline handed to the pool with nothing waiting for it (make_at_creation(false)), and its depth stand-in copies. Its descriptors, keys, label and twins are kept; its other variants, plans, settles and routings are made as its draws need them. A failed making is counted and refused where bound (RemadeAfterRecoveryFailed) through RenderPipelineState::bound_device, at set_render_pipeline_state (encoder, call checks, indirect command buffer) and an argument encoder's render word; a tile state's bind now answers its kernel's failed making the same way. A state is made again only where both generations compile alike (compiles_alike, the profile fingerprint the memo carry checked already); else its making is refused as failed. Docs: device/carry.rs, pipeline/carry.rs, MadeBeforeRecovery (render states no longer listed refused) and RemadeAfterRecoveryFailed, the DeviceRecovered cost (degradation.rs and API.md, equal), API.md's recovery entry, the runtime README; REFUSALS.md regenerated. Why: drawing states made before a recovery were refused where bound after it; Metal's go on. Verified: see the lane run reported with this sha (the test commit before it fails, this one passes), with the recovery's wall time for 0, 200 compute and 200 drawing states.
This commit is contained in:
1 parent
5ee7cb77c9
commit
6b79a77730
14 files changed
+362
-79
No files matched your search
@@ -4601,8 +4601,9 @@ impl IndirectRenderCommand {
|
||||
pub fn set_render_pipeline_state(&self, state: &RenderPipelineState) -> Result<(), Error> {
|
||||
const CALL: &str = "set_render_pipeline_state";
|
||||
self.icb.check_command_types(CALL)?;
|
||||
if !state.device().same(self.icb.device()) {
|
||||
return Err(state.device().foreign(CALL, self.icb.device()));
|
||||
let device = state.bound_device()?;
|
||||
if !device.same(self.icb.device()) {
|
||||
return Err(device.foreign(CALL, self.icb.device()));
|
||||
}
|
||||
if self.descriptor().inherit_pipeline_state {
|
||||
return Err(problem(
|
||||
|
||||
Reference in new issue
Block a user