chore: checkpoint web Blender migration source, tools and docs
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

Accumulated uncommitted work: GHOST Web backend, WebGL/GPU web layer,
web workflow engine and protocol, tooling, docs and task records.
Large generated evidence, user-testing archives, build snapshots and
imported test assets remain untracked.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-10 11:18:01 +08:00
parent 122142c26c
commit f3e21c6b98
6887 changed files with 257154 additions and 12294 deletions

View File

@@ -77,7 +77,9 @@ Session::Session(const SessionParams &params_, const SceneParams &scene_params)
};
/* Create session thread. */
#ifndef __EMSCRIPTEN__
session_thread_ = make_unique<thread>([this] { thread_run(); });
#endif
}
Session::~Session()
@@ -93,8 +95,12 @@ Session::~Session()
session_thread_cond_.notify_all();
/* Destroy session thread. */
session_thread_->join();
if (session_thread_) session_thread_->join();
session_thread_.reset();
#ifdef __EMSCRIPTEN__
path_trace_->flush_display();
path_trace_->set_display_driver(nullptr);
#endif
/* Destroy path tracer, before the device. This is needed because destruction might need to
* access device for device memory free.
@@ -113,6 +119,12 @@ Session::~Session()
void Session::start()
{
#ifdef __EMSCRIPTEN__
if (!params.background) {
progress.set_error("Cycles interactive session requires Web thread scheduling; final CPU render is available");
return;
}
#endif
{
/* Signal session thread to start rendering. */
const thread_scoped_lock session_thread_lock(session_thread_mutex_);
@@ -123,6 +135,16 @@ void Session::start()
session_thread_state_ = SESSION_THREAD_RENDER;
}
#ifdef __EMSCRIPTEN__
try {
thread_render();
}
catch (...) {
session_thread_state_ = SESSION_THREAD_WAIT;
throw;
}
session_thread_state_ = SESSION_THREAD_WAIT;
#endif
session_thread_cond_.notify_all();
}