mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-05 13:38:47 +02:00
Merge pull request #16058 from jherico/fix/bugz-1119
BUGZ-1119: workaround for race condition crash in QML rendering
This commit is contained in:
commit
1e5c81c251
1 changed files with 9 additions and 2 deletions
|
@ -136,7 +136,6 @@ void RenderEventHandler::qmlRender(bool sceneGraphSync) {
|
||||||
|
|
||||||
resize();
|
resize();
|
||||||
|
|
||||||
|
|
||||||
if (_currentSize != QSize()) {
|
if (_currentSize != QSize()) {
|
||||||
PROFILE_RANGE(render_qml_gl, "render");
|
PROFILE_RANGE(render_qml_gl, "render");
|
||||||
GLuint texture = SharedObject::getTextureCache().acquireTexture(_currentSize);
|
GLuint texture = SharedObject::getTextureCache().acquireTexture(_currentSize);
|
||||||
|
@ -148,7 +147,15 @@ void RenderEventHandler::qmlRender(bool sceneGraphSync) {
|
||||||
} else {
|
} else {
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
_shared->setRenderTarget(_fbo, _currentSize);
|
_shared->setRenderTarget(_fbo, _currentSize);
|
||||||
_shared->_renderControl->render();
|
|
||||||
|
// workaround for https://highfidelity.atlassian.net/browse/BUGZ-1119
|
||||||
|
{
|
||||||
|
// Serialize QML rendering because of a crash caused by Qt bug
|
||||||
|
// https://bugreports.qt.io/browse/QTBUG-77469
|
||||||
|
static std::mutex qmlRenderMutex;
|
||||||
|
std::unique_lock<std::mutex> qmlRenderLock{ qmlRenderMutex };
|
||||||
|
_shared->_renderControl->render();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_shared->_lastRenderTime = usecTimestampNow();
|
_shared->_lastRenderTime = usecTimestampNow();
|
||||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||||
|
|
Loading…
Reference in a new issue