Repository navigation
Pipelines the driver fails to compile are retried; a failing pipeline names itself - #262
Conversation
… names itself On a 2 GB Apple TV HD (A8) a game aborted at launch in a bloom-pipeline-warm thread: wgpu's default error handler panicked in create_render_pipeline, and the crash report gave neither the pipeline nor the error. One of the logs had the kernel note that a VM allocation failed: under memory pressure the system can stop Metal's compiler service in the middle of a compile. Each lazy pipeline is now created inside error scopes (thread-local, so a prewarm thread catches only its own pipeline's errors). An internal or out-of-memory error is retried up to 4 times; a validation error, or a compile that keeps failing, panics with the pipeline's label and wgpu's message. The web keeps the device's handler (its scopes resolve async). Prewarming on tvOS uses one thread, so one compile is in flight at a time.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Why
A tvOS game (App Review's Apple TV HD, A8, 2 GB, tvOS 26.6.1) aborted at launch in a
bloom-pipeline-warmthread:LazyRenderPipeline→create_render_pipeline→ wgpu'sdefault_error_handlerpanic. The crash report names neither the pipeline nor the error. One of the two logs carries the kernel notemach_vm_allocate_kernel failed within call to vm_map_enter; under memory pressure the system can stop Metal's compiler service mid-compile, which fails the pipeline with an internal error. The tvOS simulator (Apple2 limits) and an Apple TV 4K don't reproduce it.What
lazy_pipeline.rs: each lazy render/compute pipeline is created inside error scopes (create_checked). Scopes are thread-local, so a prewarm thread only catches its own pipeline's errors.prewarm: one worker thread on tvOS, so one compile is in flight at a time.Tests
cargo test --lib lazy_pipeline: 5 pass, 2 new (a valid pipeline builds through the scopes; an invalid one panics with its name).Summary by CodeRabbit