be really safe when creating swapchains
This commit is contained in:
@@ -1170,6 +1170,7 @@ void application::loop()
|
||||
}
|
||||
scene->set_focused(true);
|
||||
|
||||
std::lock_guard lock(render_mutex);
|
||||
XrFrameState framestate = xr_session.wait_frame();
|
||||
|
||||
auto t1 = std::chrono::steady_clock::now();
|
||||
|
||||
@@ -154,6 +154,10 @@ class application : public singleton<application>
|
||||
boost::locale::generator gen;
|
||||
boost::locale::gnu_gettext::messages_info messages_info;
|
||||
|
||||
public:
|
||||
std::mutex render_mutex;
|
||||
|
||||
private:
|
||||
void loop();
|
||||
|
||||
std::mutex debug_report_mutex;
|
||||
|
||||
@@ -1071,7 +1071,8 @@ void scenes::stream::setup(const to_headset::video_stream_description & descript
|
||||
|
||||
void scenes::stream::setup_reprojection_swapchain()
|
||||
{
|
||||
std::unique_lock lock(decoder_mutex);
|
||||
std::scoped_lock lock(application::instance().render_mutex, decoder_mutex);
|
||||
device.waitIdle();
|
||||
|
||||
swapchains.clear();
|
||||
const uint32_t video_width = video_stream_description->width / view_count;
|
||||
|
||||
Reference in New Issue
Block a user