summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
{