9#include <QtCore/qthreadpool.h>
12#include <QtCore/qtenvironmentvariables.h>
14#include <QtQuick/private/qsgcontext_p.h>
15#include <QtQuick/private/qsgrenderer_p.h>
17#include "graphobjects/qssgrenderroot_p.h"
18#include "graphobjects/qssgrenderlayer_p.h"
19#include "graphobjects/qssgrenderitem2d_p.h"
22#include "resourcemanager/qssgrenderbuffermanager_p.h"
26Q_STATIC_LOGGING_CATEGORY(lcLayerData,
"qt.quick3d.render.layerdata")
28static void reindexChildNodes(QSSGRenderNode &node,
const QSSGRenderNodeVersionType version, quint32 &dfsIdx, size_t &count)
30 Q_ASSERT(node.type != QSSGRenderNode::Type::Layer);
31 if (node.type != QSSGRenderNode::Type::Layer) {
35 if (node.h.version() != version)
36 node.h = QSSGRenderNodeHandle(0, version, dfsIdx);
37 for (QSSGRenderNode &chld : node.children)
38 reindexChildNodes(chld, version, ++dfsIdx, ++count);
42static void reindexLayerChildNodes(QSSGRenderLayer &layer,
const QSSGRenderNodeVersionType version, quint32 &dfsIdx, size_t &count)
44 Q_ASSERT(layer.type == QSSGRenderNode::Type::Layer);
45 if (layer.type == QSSGRenderNode::Type::Layer) {
46 layer.h = QSSGRenderNodeHandle(0, version, 0);
47 for (QSSGRenderNode &chld : layer.children)
48 reindexChildNodes(chld, version, ++dfsIdx, ++count);
52static void reindex(QSSGRenderRoot *rootNode,
const QSSGRenderNodeVersionType version, quint32 &dfsIdx, size_t &count)
55 Q_ASSERT(rootNode->type == QSSGRenderNode::Type::Root);
56 Q_ASSERT(dfsIdx == 0);
57 rootNode->h = QSSGRenderNodeHandle(0, version, 0);
58 for (QSSGRenderNode &chld : rootNode->children)
59 reindexLayerChildNodes(
static_cast<QSSGRenderLayer &>(chld), version, dfsIdx, count);
63enum class Insert { Back, Indexed };
67 Q_ASSERT_X(node.type != QSSGRenderNode::Type::Layer, Q_FUNC_INFO,
"Unexpected Layer node in child list!");
68 if constexpr (insert == Insert::Indexed)
69 outList[idx++] = &node;
71 outList.push_back(&node);
72 for (QSSGRenderNode &chld : node.children)
73 collectChildNodesFirst<insert>(chld, outList, idx);
79 if (node.getGlobalState(QSSGRenderNode::GlobalState::Active)) {
80 if constexpr (insert == Insert::Indexed)
81 outList[idx++] = &node;
83 outList.push_back(&node);
84 for (QSSGRenderNode &chld : node.children)
85 collectChildNodesSecond<insert>(chld, outList, idx);
93 Q_ASSERT(layer->type == QSSGRenderNode::Type::Layer);
95 for (QSSGRenderNode &chld : layer->children) {
96 if constexpr (discard == Discard::Inactive)
97 collectChildNodesSecond<insert>(chld, outList, idx);
99 collectChildNodesFirst<insert>(chld, outList, idx);
103 if constexpr (insert == Insert::Back)
104 idx = outList.size();
109 const QSSGRenderNodeVersionType version,
110 QSSGGlobalRenderNodeData::GlobalTransformStore &globalTransforms,
111 QSSGGlobalRenderNodeData::GlobalOpacityStore &globalOpacities)
113 using DirtyFlag = QSSGRenderNode::DirtyFlag;
114 using FlagT = QSSGRenderNode::FlagT;
115 constexpr DirtyFlag TransformAndOpacityDirty = DirtyFlag(FlagT(DirtyFlag::TransformDirty) | FlagT(DirtyFlag::OpacityDirty));
117 if (Q_UNLIKELY(!node || (node->h.version() != version)))
121 bool retval = forcedRebuild || node->isDirty(TransformAndOpacityDirty);
127 const bool alwaysDirty = node->isDirty(DirtyFlag::StickyDirty);
129 if (retval || alwaysDirty) {
130 const auto idx = node->h.index();
132 auto &globalTransform = globalTransforms[idx];
133 auto &globalOpacity = globalOpacities[idx];
134 globalOpacity = node->localOpacity;
135 globalTransform = node->localTransform;
137 if (QSSGRenderNode *parent = node->parent) {
138 const auto pidx = parent->h.index();
139 const auto pOpacity = globalOpacities[pidx];
140 globalOpacity *= pOpacity;
142 if (parent->type != QSSGRenderGraphObject::Type::Layer) {
143 const auto pTransform = globalTransforms[pidx];
144 globalTransform = pTransform * node->localTransform;
148 node->clearDirty(TransformAndOpacityDirty);
158 using LocalState = QSSGRenderNode::LocalState;
159 using GlobalState = QSSGRenderNode::GlobalState;
160 using DirtyFlag = QSSGRenderNode::DirtyFlag;
161 using FlagT = QSSGRenderNode::FlagT;
163 constexpr DirtyFlag ClearDirtyMask = DirtyFlag(FlagT(DirtyFlag::ActiveDirty) | FlagT(DirtyFlag::PickableDirty) | FlagT(DirtyFlag::ImportDirty));
165 if (Q_UNLIKELY(!node || (node->h.version() != version)))
168 const bool activeDirty = node->isDirty(DirtyFlag::ActiveDirty);
169 const bool pickableDirty = node->isDirty(DirtyFlag::PickableDirty);
170 const bool importedDirty = node->isDirty(DirtyFlag::ImportDirty);
172 const bool updateState = activeDirty || pickableDirty || importedDirty;
175 const QSSGRenderNode *parent = node->parent;
176 const bool hasParent = (parent !=
nullptr);
177 const bool globallyActive = node->getLocalState(LocalState::Active) && (!hasParent || parent->getGlobalState(GlobalState::Active));
178 node->flags = globallyActive ? (node->flags | FlagT(GlobalState::Active)) : (node->flags & ~FlagT(GlobalState::Active));
179 const bool globallyPickable = node->getLocalState(LocalState::Pickable) || (hasParent && parent->getGlobalState(GlobalState::Pickable));
180 node->flags = globallyPickable ? (node->flags | FlagT(GlobalState::Pickable)) : (node->flags & ~FlagT(GlobalState::Pickable));
181 const bool globallyImported = node->getLocalState(LocalState::Imported) || (hasParent && parent->getGlobalState(GlobalState::Imported));
182 node->flags = globallyImported ? (node->flags | FlagT(GlobalState::Imported)) : (node->flags & ~FlagT(GlobalState::Imported));
185 node->clearDirty(ClearDirtyMask);
192 const VersionType version,
193 QSSGGlobalRenderNodeData::GlobalTransformStore &globalTransforms,
194 QSSGGlobalRenderNodeData::InstanceTransformStore &instanceTransforms)
196 if (Q_UNLIKELY(!node || (node->h.version() != version)))
199 constexpr bool retval =
true;
204 const auto idx = node->h.index();
205 QSSGRenderNode *parent = node->parent;
206 if (parent && parent->type != QSSGRenderGraphObject::Type::Layer && node->getLocalState(QSSGRenderNode::LocalState::Active)) {
207 const auto pidx = parent->h.index();
208 const auto &pGlobalTransform = globalTransforms[pidx];
209 QSSGRenderNode *instanceRoot = node->instanceRoot;
210 if (instanceRoot == node) {
211 instanceTransforms[idx] = { node->localTransform, pGlobalTransform };
212 }
else if (instanceRoot) {
213 auto &[nodeInstanceLocalTransform, nodeInstanceGlobalTransform] = instanceTransforms[idx];
214 auto &[instanceRootLocalTransform, instanceRootGlobalTransform] = instanceTransforms[instanceRoot->h.index()];
215 nodeInstanceGlobalTransform = instanceRootGlobalTransform;
218 nodeInstanceLocalTransform = node->localTransform;
221 if (p == instanceRoot) {
222 nodeInstanceLocalTransform = instanceRootLocalTransform * nodeInstanceLocalTransform;
225 nodeInstanceLocalTransform = p->localTransform * nodeInstanceLocalTransform;
231 QMatrix4x4 globalInstanceTransform = globalTransforms[pidx];
232 QMatrix4x4 localInstanceTransform = node->localTransform;
233 auto &localInstanceMatrix = *
reinterpret_cast<
float (*)[4][4]>(localInstanceTransform.data());
234 QVector3D localPos{localInstanceMatrix[3][0], localInstanceMatrix[3][1], localInstanceMatrix[3][2]};
235 localInstanceMatrix[3][0] = 0;
236 localInstanceMatrix[3][1] = 0;
237 localInstanceMatrix[3][2] = 0;
238 globalInstanceTransform = pGlobalTransform;
239 globalInstanceTransform.translate(localPos);
240 instanceTransforms[idx] = { localInstanceTransform, globalInstanceTransform };
243 instanceTransforms[idx] = { node->localTransform, {} };
249QSSGGlobalRenderNodeData::QSSGGlobalRenderNodeData(QSSGRenderRoot *root)
250#if QT_CONFIG(thread) && !defined(Q_OS_WASM)
251 : m_threadPool(
new QThreadPool)
260QSSGGlobalRenderNodeData::~QSSGGlobalRenderNodeData()
265void QSSGGlobalRenderNodeData::reindex()
277 if (Q_UNLIKELY(m_version == 0)) {
278 qCDebug(lcLayerData) <<
"Version wrap around detected, resetting to 1.";
282 ::reindex(m_rootNode, m_version, dfsIdx, m_nodeCount);
290 globalTransforms.resize(m_size, QMatrix4x4{ Qt::Uninitialized });
291 globalOpacities.resize(m_size, 1.0f);
292 instanceTransforms.resize(m_size, { QMatrix4x4{ Qt::Uninitialized }, QMatrix4x4{ Qt::Uninitialized } });
293 normalMatrices.resize(m_size, QMatrix3x3{});
294 meshes.resize(m_size,
nullptr);
295 materials.resize(m_size, {});
297 collectNodes(m_rootNode);
304void QSSGGlobalRenderNodeData::invalidate()
306 m_rootNode =
nullptr;
309QMatrix4x4 QSSGGlobalRenderNodeData::getGlobalTransform(QSSGRenderNodeHandle h,
const QMatrix4x4 &defaultValue)
const
312 const bool hasId = h.hasId();
313 const bool validVersion = hasId && (h.version() == m_version);
314 const auto index = h.index();
318 if (!validVersion || !(globalTransforms.size() > index))
321 return globalTransforms[index];
324QMatrix4x4 QSSGGlobalRenderNodeData::getGlobalTransform(QSSGRenderNodeHandle h)
const
326 return getGlobalTransform(h, QMatrix4x4{ Qt::Uninitialized });
329QMatrix4x4 QSSGGlobalRenderNodeData::getGlobalTransform(
const QSSGRenderNode &node)
const
331 return getGlobalTransform(node.h, node.localTransform);
334float QSSGGlobalRenderNodeData::getGlobalOpacity(QSSGRenderNodeHandle h,
float defaultValue)
const
336 const bool hasId = h.hasId();
337 const bool validVersion = hasId && (h.version() == m_version);
338 const auto index = h.index();
340 if (!validVersion || !(globalOpacities.size() > index))
343 return globalOpacities[index];
346float QSSGGlobalRenderNodeData::getGlobalOpacity(
const QSSGRenderNode &node)
const
348 return getGlobalOpacity(node.h, node.localOpacity);
353QThreadPool *QSSGGlobalRenderNodeData::threadPool()
const {
return nullptr; }
355QThreadPool *QSSGGlobalRenderNodeData::threadPool()
const {
return m_threadPool.get(); }
359QSSGGlobalRenderNodeData::LayerNodeView QSSGGlobalRenderNodeData::getLayerNodeView(QSSGRenderLayerHandle h)
const
361 const bool hasId = h.hasId();
362 const bool validVersion = hasId && (h.version() == m_version);
363 const auto index = h.index();
365 if (!validVersion || !(layerNodes.size() > index))
368 auto §ion = layerNodes[index];
370 return { nodes.data() + section.offset, qsizetype(section.size) };
373QSSGGlobalRenderNodeData::LayerNodeView QSSGGlobalRenderNodeData::getLayerNodeView(
const QSSGRenderLayer &layer)
const
375 return getLayerNodeView(layer.lh);
378void QSSGGlobalRenderNodeData::collectNodes(QSSGRenderRoot *rootNode)
383 Q_ASSERT(rootNode !=
nullptr);
386 nodes.resize(m_nodeCount,
nullptr);
390 quint32 layerIdx = 0;
391 for (QSSGRenderNode &chld : rootNode->children) {
392 Q_ASSERT(chld.type == QSSGRenderNode::Type::Layer);
393 QSSGRenderLayer *layer =
static_cast<QSSGRenderLayer *>(&chld);
394 const size_t offset = idx;
395 collectLayerChildNodes<Discard::None, Insert::Indexed>(layer, nodes, idx);
396 layer->lh = QSSGRenderLayerHandle(layer->h.context(), m_version, layerIdx++);
397 layerNodes.emplace_back(LayerNodeSection{offset , idx - offset});
403void QSSGGlobalRenderNodeData::updateGlobalState()
406 for (QSSGRenderNode *node : nodes)
407 QSSGRenderDataHelpers::updateGlobalNodeState(node, m_version);
410 for (QSSGRenderNode *node : nodes)
411 calcGlobalNodeDataIndexedImpl<QSSGRenderDataHelpers::Strategy::Initial>(node, m_version, globalTransforms, globalOpacities);
414 for (QSSGRenderNode *node : nodes)
415 QSSGRenderDataHelpers::calcInstanceTransforms(node, m_version, globalTransforms, instanceTransforms);
418QSSGGlobalRenderNodeData::InstanceTransforms QSSGGlobalRenderNodeData::getInstanceTransforms(
const QSSGRenderNode &node)
const
420 return getInstanceTransforms(node.h);
423QSSGGlobalRenderNodeData::InstanceTransforms QSSGGlobalRenderNodeData::getInstanceTransforms(QSSGRenderNodeHandle h)
const
425 const bool hasId = h.hasId();
426 const bool validVersion = hasId && (h.version() == m_version);
427 const auto index = h.index();
429 if (!validVersion || !(instanceTransforms.size() > index))
432 return instanceTransforms[index];
436 : m_gnd(globalNodeData)
437 , m_version(globalNodeData->version())
444 const bool hasId = h.hasId();
445 const bool validVersion = hasId && (h.version() == m_gnd->version());
446 const auto index = h.index();
447 if (!validVersion || !(m_gnd->normalMatrices.size() > index))
450 return m_gnd->normalMatrices[index];
455 return getNormalMatrix(model.h, QMatrix3x3{ Qt::Uninitialized });
460 const bool hasId = model.h.hasId();
461 const bool validVersion = hasId && (model.h.version() == m_gnd->version());
462 const auto index = model.h.index();
464 if (!validVersion || !(m_gnd->meshes.size() > index))
467 return m_gnd->meshes[index];
472 const bool hasId = model.h.hasId();
473 const bool validVersion = hasId && (model.h.version() == m_gnd->version());
474 const auto index = model.h.index();
476 if (!validVersion || !(m_gnd->materials.size() > index))
479 return m_gnd->materials[index];
482QSSGRenderModelData::ModelViewProjections
QSSGRenderModelData::getModelViewProjection(
const QSSGRenderModel &model)
const
484 return getModelViewProjection(model.h);
489 const bool hasId = h.hasId();
490 const bool validVersion = hasId && (h.version() == m_version);
491 const auto index = h.index();
493 if (!validVersion || !(modelViewProjections.size() > index))
496 return modelViewProjections[index];
501 const auto &bufferManager = renderer->contextInterface()->bufferManager();
503 const bool globalPickingEnabled = QSSGRendererPrivate::isGlobalPickingEnabled(*renderer);
505 for (
auto *model : models) {
514 if (
auto *theMesh = bufferManager->loadMesh(*model)) {
515 m_gnd->meshes[model->h.index()] = theMesh;
519 const float modelGlobalOpacity = m_gnd->getGlobalOpacity(*model);
520 const bool canModelBePickable = (modelGlobalOpacity > QSSGRendererPrivate::minimumRenderOpacity)
521 && (globalPickingEnabled
522 || model->getGlobalState(QSSGRenderModel::GlobalState::Pickable));
523 if (canModelBePickable) {
526 const QSSGMesh::Mesh mesh = bufferManager->loadLightmapMesh(*model);
529 theMesh->bvh = bufferManager->loadMeshBVH(mesh);
530 else if (model->geometry)
531 theMesh->bvh = bufferManager->loadMeshBVH(model->geometry);
532 else if (!model->meshPath.isNull())
533 theMesh->bvh = bufferManager->loadMeshBVH(model->meshPath);
536 const auto &roots = theMesh->bvh->roots();
537 for (qsizetype i = 0, end = qsizetype(roots.size()); i < end; ++i)
538 theMesh->subsets[i].bvhRoot = roots[i];
543 m_gnd->meshes[model->h.index()] =
nullptr;
551 bufferManager->commitBufferResourceUpdates();
556 for (
auto *model : models)
557 m_gnd->materials[model->h.index()] = model->materials;
562 const bool versionChanged = m_version != m_gnd->version();
564 m_version = m_gnd->version();
566 const QMatrix4x4 defaultModelViewProjection;
570 modelViewProjections.resize(m_gnd->storageSize(), { defaultModelViewProjection, defaultModelViewProjection });
573 QThreadPool *threadPool = (
static_cast<size_t>(models.size()) >= m_threadPoolThreshold)
574 ? m_gnd->threadPool() :
nullptr;
577#if QT_CONFIG(thread) && !defined(Q_OS_WASM)
578 bool matrixesDone =
false;
579 bool mvpsDone =
false;
583 const auto doNormalMatrices = [&]() {
584 for (
const QSSGRenderModel *model : std::as_const(models)) {
585 auto &normalMatrix = m_gnd->normalMatrices[model->h.index()];
586 const QMatrix4x4 &globalTransform = m_gnd->globalTransforms[model->h.index()];
587 QSSGRenderNode::calculateNormalMatrix(globalTransform, normalMatrix);
589#if QT_CONFIG(thread) && !defined(Q_OS_WASM)
591 std::lock_guard<std::mutex> guard(m_mutex);
599 const auto doMVPs = [&]() {
600 for (
const QSSGRenderModel *model : std::as_const(models)) {
602 const QMatrix4x4 &globalTransform = m_gnd->globalTransforms[model->h.index()];
603 auto &mvp = modelViewProjections[model->h.index()];
604 for (
const QSSGRenderCameraData &cameraData : renderCameraData)
605 QSSGRenderNode::calculateMVP(globalTransform, cameraData.viewProjection, mvp[mvpCount++]);
607#if QT_CONFIG(thread) && !defined(Q_OS_WASM)
609 std::lock_guard<std::mutex> guard(m_mutex);
617#define qssgTryThreadedStart(func)
620 } else if (!threadPool->tryStart(func)) {
621 qWarning("Unable to start thread for %s!", #func);
625#define qssgTryThreadedStart(func)
634 prepareMaterials(models);
635 prepareMeshData(models, renderer);
638#if QT_CONFIG(thread) && !defined(Q_OS_WASM)
640 std::unique_lock<std::mutex> guard(m_mutex);
641 m_cv.wait(guard, [&]() {
return matrixesDone && mvpsDone; });
649 const int ret = qEnvironmentVariableIntValue(
"QSSG_MODEL_DATA_THREAD_POOL_THRESHOLD");
650 return (ret > 0) ? quint32(ret) : 32u;
653bool QSSGRenderDataHelpers::updateGlobalNodeDataIndexed(QSSGRenderNode *node,
const VersionType version, QSSGGlobalRenderNodeData::GlobalTransformStore &globalTransforms, QSSGGlobalRenderNodeData::GlobalOpacityStore &globalOpacities)
655 return calcGlobalNodeDataIndexedImpl<
Strategy::Update>(node, version, globalTransforms, globalOpacities);
658bool QSSGRenderDataHelpers::calcGlobalVariablesIndexed(QSSGRenderNode *node,
const VersionType version, QSSGGlobalRenderNodeData::GlobalTransformStore &globalTransforms, QSSGGlobalRenderNodeData::GlobalOpacityStore &globalOpacities)
660 return calcGlobalNodeDataIndexedImpl<
Strategy::Initial>(node, version, globalTransforms, globalOpacities);
665 const auto foundIt = item2DRenderers.find(&item);
666 return (foundIt != item2DRenderers.cend()) ? foundIt->second : Item2DRenderer{};
671 const bool hasId = h.hasId();
672 const bool validVersion = hasId && (h.version() == m_version);
673 const auto index = h.index();
675 if (!validVersion || !(modelViewProjections.size() > index))
678 return modelViewProjections[index];
683 return getModelViewProjection(item.h);
688 m_gnd = globalNodeData;
689 m_version = globalNodeData->version();
699 const auto itemCount = size_t(items.size());
704 const bool versionChanged = m_version != m_gnd->version();
706 m_version = m_gnd->version();
708 const QMatrix4x4 defaultModelViewProjection;
710 const auto &rhiCtx = renderer->contextInterface()->rhiContext();
713 modelViewProjections.resize(m_gnd->storageSize(), { defaultModelViewProjection, defaultModelViewProjection });
715 const auto &clipSpaceCorrMatrix = rhiCtx->rhi()->clipSpaceCorrMatrix();
718 const auto doMVPs = [&]() {
719 for (
const QSSGRenderItem2D *item : std::as_const(items)) {
721 const QMatrix4x4 &globalTransform = m_gnd->globalTransforms[item->h.index()];
722 auto &mvps = modelViewProjections[item->h.index()];
723 for (
const QSSGRenderCameraData &cameraData : renderCameraData) {
724 const QMatrix4x4 &mvp = cameraData.viewProjection * globalTransform;
725 mvps[mvpCount++] = clipSpaceCorrMatrix * mvp * flipMatrix;
734 QSGRenderContext *sgRc = QSSGRendererPrivate::getSgRenderContext(*renderer);
735 const bool contextChanged = (item2DRenderContext && item2DRenderContext != sgRc);
736 item2DRenderContext = sgRc;
738 for (
const QSSGRenderItem2D *theItem2D : std::as_const(items)) {
739 auto item2DRenderer = getItem2DRenderer(*theItem2D);
740 if (contextChanged) {
741 delete item2DRenderer;
744 item2DRenderer.clear();
747 if (!item2DRenderer) {
748 item2DRenderer = sgRc->createRenderer(QSGRendererInterface::RenderMode3D);
749 QObject::connect(item2DRenderer, SIGNAL(sceneGraphChanged()), theItem2D->m_frontEndObject, SLOT(update()));
752 if (item2DRenderer->rootNode() != theItem2D->m_rootNode) {
753 item2DRenderer->setRootNode(theItem2D->m_rootNode);
754 theItem2D->m_rootNode->markDirty(QSGNode::DirtyForceUpdate);
755 item2DRenderer->nodeChanged(theItem2D->m_rootNode, QSGNode::DirtyForceUpdate);
758 item2DRenderers[theItem2D] = item2DRenderer;
764 const auto foundIt = item2DRenderers.find(&item);
765 if (foundIt != item2DRenderers.cend()) {
766 delete foundIt->second;
767 item2DRenderers.erase(foundIt);
776 for (
auto &it : item2DRenderers)
778 item2DRenderers.clear();
779 item2DRenderContext =
nullptr;
780 modelViewProjections.clear();
friend class QSSGRenderer
void releaseRenderData(const QSSGRenderItem2D &item)
void updateItem2DData(QSSGItem2DsView &items, QSSGRenderer *renderer, const QSSGRenderCameraDataList &renderCameraData)
Item2DRenderer getItem2DRenderer(const QSSGRenderItem2D &item) const
ModelViewProjections getModelViewProjection(const QSSGRenderItem2D &item) const
ModelViewProjections getModelViewProjection(QSSGRenderNodeHandle h) const
ModelViewProjections getModelViewProjection(QSSGRenderNodeHandle h) const
void updateModelData(QSSGModelsView &models, QSSGRenderer *renderer, const QSSGRenderCameraDataList &renderCameraData)
QMatrix3x3 getNormalMatrix(QSSGRenderNodeHandle h, QMatrix3x3 defaultValue) const
static bool calcGlobalNodeDataIndexedImpl(QSSGRenderNode *node, const QSSGRenderNodeVersionType version, QSSGGlobalRenderNodeData::GlobalTransformStore &globalTransforms, QSSGGlobalRenderNodeData::GlobalOpacityStore &globalOpacities)
static void collectLayerChildNodes(QSSGRenderLayer *layer, QSSGGlobalRenderNodeData::NodeStore &outList, size_t &idx)
static void collectChildNodesFirst(QSSGRenderNode &node, QSSGGlobalRenderNodeData::NodeStore &outList, size_t &idx)
#define qssgTryThreadedStart(func)
static void collectChildNodesSecond(QSSGRenderNode &node, QSSGGlobalRenderNodeData::NodeStore &outList, size_t &idx)