Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
raea play no longer hangs at start-up on Windows: pipelines compile on the render thread as each frame queues them, as Bevy always compiles them on macOS. On Bevy's task pool (its asynchronous compilation, Windows and Linux only) the first frame's wait_pipelines waited on pipelines the pool left unstarted with its threads idle. With the v0.1.0 zip on an RTX 4070, 17 of 32 opens stalled 2.8-42.6 s and some never finished; on lavapipe at 4 cores, as the release run checks it, kept-unmount hung past 200 s, the stall that timed out v0.1.0's Windows live-play check and kept Windows out of the release. Compiled on the render thread, the same binary opened 32 of 32 in 0.49-0.70 s on the 4070 and passed 26 of 26 plays on lavapipe, and a build with this change passes all 13 live-play cases on both. RAEA_BEVY_ASYNC_PIPELINES=1 brings the task pool back. Why the pool leaves its tasks queued isn't known yet.
shinyobjectzfa78ed3bc469
diff --git a/engine/render/src/engine.rs b/engine/render/src/engine.rsindex 542fa5c4..7235589c 100644--- a/engine/render/src/engine.rs+++ b/engine/render/src/engine.rs@@ -171,9 +171,9 @@ pub fn phys_footprint() -> Option<u64> {None}-/// Before a frame renders, every pipeline that's compiling is waited for (they compile in parallel on the task pool),-/// so the frame draws everything it has, as synchronous compilation did. A pipeline whose shader hasn't loaded yet is-/// retried by Bevy as before; only those being compiled are waited on.+/// Before a frame renders, every pipeline compiling on the task pool (RAEA_BEVY_ASYNC_PIPELINES=1, engine/open.rs) is+/// waited for, so the frame draws everything it has, as synchronous compilation does. A pipeline whose shader hasn't+/// loaded yet is retried by Bevy as before; only those being compiled are waited on.fn wait_pipelines(mut cache: ResMut<bevy::render::render_resource::PipelineCache>) {use bevy::render::render_resource::CachedPipelineState;// a browser compiles them asynchronously, on its own event loop: a live frame there draws what's madediff --git a/engine/render/src/engine/open.rs b/engine/render/src/engine/open.rsindex f5548015..5bd30cfc 100644--- a/engine/render/src/engine/open.rs+++ b/engine/render/src/engine/open.rs@@ -51,11 +51,12 @@ impl Engine {// Hot reload (Bevy's file_watcher, in the bevy-all build) only when asked, RAEA_BEVY_WATCH=1: a render or a// baked play reloading an asset mid-run would draw frames that a render alone doesn't.set(bevy::asset::AssetPlugin { unapproved_path_mode: bevy::asset::UnapprovedPathMode::Allow, meta_check: bevy::asset::AssetMetaCheck::Never, watch_for_changes_override: Some(std::env::var_os("RAEA_BEVY_WATCH").is_some()), ..default() })- // pipelines compile on the task pool, all at once (lightspeed F5: a 3D game's first launch compiled- // them one by one, 4.5 s), and wait_pipelines holds each frame until every one it needs is made, so a- // frame still never misses a mesh whose shader was compiling: the first tagged readback of a frame is- // the frame. RAEA_BEVY_SYNC_PIPELINES=1 compiles them one at a time on the render thread, as before- .set(bevy::render::RenderPlugin { synchronous_pipeline_compilation: std::env::var_os("RAEA_BEVY_SYNC_PIPELINES").is_some(), render_creation: render_creation(), ..default() });+ // pipelines compile on the render thread as a frame queues them, as Bevy always compiles them on macOS. On+ // its task pool (Windows and Linux only) wait_pipelines held the first frame for pipelines the pool left+ // unstarted, its threads idle: 3-43 s stalls on Windows, and opens that never finished (`raea play`'s hang+ // in v0.1.0's Windows live play; 32 of 32 opened in under 0.7 s compiled here, cuda-box 11-09).+ // RAEA_BEVY_ASYNC_PIPELINES=1 compiles them on the task pool (lightspeed F5, measured when macOS had it)+ .set(bevy::render::RenderPlugin { synchronous_pipeline_compilation: std::env::var_os("RAEA_BEVY_ASYNC_PIPELINES").is_none(), render_creation: render_creation(), ..default() });// no render thread: a frame is drawn by the update that asks for it (wasm32 has no pipelined rendering to turn off)#[cfg(not(target_arch = "wasm32"))]let group = group.disable::<bevy::render::pipelined_rendering::PipelinedRenderingPlugin>();