summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2019-06-11 12:51:28 +0300
committerAntti Määttä <antti.maatta@qt.io>2019-06-11 12:51:28 +0300
commit68de77d6c44ab05ec4a251aa928dbb04d00e3299 (patch)
tree3a512bea2c46c75555c2b50b2af1db859356af7d /src
parent24bdd648eb1724b50594408de4bfbf1f73a755d1 (diff)
Fix kria-cluster-demo slowness with delayed loading
Empty load sets after they have began processing. Task-number: QT3DS-3662 Change-Id: Ic73f062f65500b8d1f349d98376fb1d22e32b06b Reviewed-by: Jari Karppinen <jari.karppinen@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/runtime/Qt3DSApplication.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/runtime/Qt3DSApplication.cpp b/src/runtime/Qt3DSApplication.cpp
index baa94dd..9f013a2 100644
--- a/src/runtime/Qt3DSApplication.cpp
+++ b/src/runtime/Qt3DSApplication.cpp
@@ -338,8 +338,10 @@ struct STextureUploadRenderTask : public IRenderTask, public IImageLoadListener
sourcePaths.push_back(m_bufferManager.GetStringTable().RegisterStr(s));
QT3DSU32 id = m_batchLoader.LoadImageBatch(sourcePaths, CRegisteredString(),
this, m_type, m_preferKtx, false);
- if (id)
+ if (id) {
m_batches[id] = m_uploadSet;
+ m_uploadSet.clear();
+ }
}
if (!m_uploadWaitSet.isEmpty()) {
nvvector<CRegisteredString> sourcePaths(m_bufferManager.GetStringTable().GetAllocator(),
@@ -351,9 +353,11 @@ struct STextureUploadRenderTask : public IRenderTask, public IImageLoadListener
if (id) {
m_batchLoader.BlockUntilLoaded(id);
m_bufferManager.loadSet(m_uploadWaitSet);
+ m_uploadWaitSet.clear();
}
}
- m_bufferManager.unloadSet(m_deleteSet);
+ if (!m_deleteSet.isEmpty())
+ m_bufferManager.unloadSet(m_deleteSet);
}
void add(const QSet<QString> &set, bool wait)
{