chore: checkpoint web Blender migration source, tools and docs
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:
@@ -77,7 +77,9 @@ Session::Session(const SessionParams ¶ms_, 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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user