summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Albamont <jim.albamont@kdab.com>2019-09-13 10:20:37 -0700
committerJim Albamont <jim.albamont@kdab.com>2019-09-20 00:37:31 -0700
commit41968b79393df2cb2c859f76b92922c7c5dbc3b1 (patch)
treee0086b688cd56c26009e26e28214b9628f68e9d8
parentde4c982ceeb2abcdec8b214fd95e6e5d5d72b9ff (diff)
Remove backend entity hierarchy rebuilding jobs
We no longer need to have a special job to rebuild the entity hierarchy as parent nodes can now always be resolved on the backend either at creation time or while reparenting. The NodePostConstructorInit ensure that all backend nodes are created from the top down so a node can always find it's parent. Change-Id: I9dcfb64b62e2e02b89b1ae59efb41f25dfc09eae Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r--src/render/backend/abstractrenderer_p.h1
-rw-r--r--src/render/backend/entity.cpp60
-rw-r--r--src/render/backend/entity_p.h9
-rw-r--r--src/render/jobs/job_common_p.h1
-rw-r--r--src/render/jobs/jobs.pri2
-rw-r--r--src/render/jobs/updateentityhierarchyjob.cpp80
-rw-r--r--src/render/jobs/updateentityhierarchyjob_p.h91
-rw-r--r--src/render/renderers/opengl/renderer/renderer.cpp19
-rw-r--r--src/render/renderers/opengl/renderer/renderer_p.h2
-rw-r--r--tests/auto/render/boundingsphere/tst_boundingsphere.cpp5
-rw-r--r--tests/auto/render/entity/tst_entity.cpp218
-rw-r--r--tests/auto/render/layerfiltering/tst_layerfiltering.cpp5
-rw-r--r--tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp5
-rw-r--r--tests/auto/render/proximityfiltering/tst_proximityfiltering.cpp4
-rw-r--r--tests/auto/render/qcamera/tst_qcamera.cpp5
-rw-r--r--tests/auto/render/raycastingjob/tst_raycastingjob.cpp5
-rw-r--r--tests/auto/render/renderer/tst_renderer.cpp25
-rw-r--r--tests/auto/render/updateshaderdatatransformjob/tst_updateshaderdatatransformjob.cpp5
18 files changed, 140 insertions, 402 deletions
diff --git a/src/render/backend/abstractrenderer_p.h b/src/render/backend/abstractrenderer_p.h
index 24371a9f0..006919512 100644
--- a/src/render/backend/abstractrenderer_p.h
+++ b/src/render/backend/abstractrenderer_p.h
@@ -113,7 +113,6 @@ public:
JointDirty = 1 << 11,
LayersDirty = 1 << 12,
TechniquesDirty = 1 << 13,
- EntityHierarchyDirty= 1 << 14,
LightsDirty = 1 << 15,
AllDirty = 0xffffff
};
diff --git a/src/render/backend/entity.cpp b/src/render/backend/entity.cpp
index d8520a97e..8be58dd46 100644
--- a/src/render/backend/entity.cpp
+++ b/src/render/backend/entity.cpp
@@ -95,11 +95,19 @@ void Entity::cleanup()
if (m_nodeManagers != nullptr) {
m_nodeManagers->worldMatrixManager()->releaseResource(peerId());
qCDebug(Render::RenderNodes) << Q_FUNC_INFO;
+
+ removeFromParentChildHandles();
+
+ for (auto &childHandle : qAsConst(m_childrenHandles)) {
+ auto child = m_nodeManagers->renderNodesManager()->data(childHandle);
+ // children should always exist and have this as parent
+ // if they were destroyed, they would have removed themselves from our m_childrenHandles
+ Q_ASSERT(child);
+ Q_ASSERT(child->m_parentHandle == m_handle);
+ child->m_parentHandle = {};
+ }
}
- if (!m_parentEntityId.isNull())
- markDirty(AbstractRenderer::EntityHierarchyDirty);
- m_parentEntityId = Qt3DCore::QNodeId();
m_worldTransform = HMatrix();
// Release all component will have to perform their own release when they receive the
// NodeDeleted notification
@@ -122,6 +130,7 @@ void Entity::cleanup()
m_localBoundingVolume.reset();
m_worldBoundingVolume.reset();
m_worldBoundingVolumeWithChildren.reset();
+ m_parentHandle = {};
m_boundingDirty = false;
QBackendNode::setEnabled(false);
}
@@ -129,6 +138,12 @@ void Entity::cleanup()
void Entity::setParentHandle(HEntity parentHandle)
{
Q_ASSERT(m_nodeManagers);
+
+ if (parentHandle == m_parentHandle)
+ return;
+
+ removeFromParentChildHandles();
+
m_parentHandle = parentHandle;
auto parent = m_nodeManagers->renderNodesManager()->data(parentHandle);
if (parent != nullptr && !parent->m_childrenHandles.contains(m_handle))
@@ -182,13 +197,19 @@ void Entity::syncFromFrontEnd(const QNode *frontEnd, bool firstTime)
}
const auto parentID = node->parentEntity() ? node->parentEntity()->id() : Qt3DCore::QNodeId();
- if (m_parentEntityId != parentID) {
- m_parentEntityId = parentID;
- // TODO: change to EventHierarchyDirty and update renderer to
- // ensure all jobs are run that depend on Entity hierarchy.
+ auto parentHandle = m_nodeManagers->renderNodesManager()->lookupHandle(parentID);
+
+ // All entity creation is done from top-down and always during the same frame, so
+ // we if we have a valid parent node, we should always be able to resolve the
+ // backend parent at this time
+ Q_ASSERT(!node->parentEntity() || (!parentHandle.isNull() && m_nodeManagers->renderNodesManager()->data(parentHandle)));
+
+ if (parentHandle != m_parentHandle) {
markDirty(AbstractRenderer::AllDirty);
}
+ setParentHandle(parentHandle);
+
if (firstTime) {
m_worldTransform = m_nodeManagers->worldMatrixManager()->getOrAcquireHandle(peerId());
@@ -215,8 +236,6 @@ void Entity::syncFromFrontEnd(const QNode *frontEnd, bool firstTime)
const auto idAndType = QNodeIdTypePair(c->id(), QNodePrivate::findStaticMetaObject(c->metaObject()));
addComponent(idAndType);
}
-
- markDirty(AbstractRenderer::EntityHierarchyDirty);
}
BackendNode::syncFromFrontEnd(frontEnd, firstTime);
@@ -238,25 +257,12 @@ Entity *Entity::parent() const
return m_nodeManagers->renderNodesManager()->data(m_parentHandle);
}
-
-// clearEntityHierarchy and rebuildEntityHierarchy should only be called
-// from UpdateEntityHierarchyJob to update the entity hierarchy for the
-// entire scene at once
-void Entity::clearEntityHierarchy()
-{
- m_childrenHandles.clear();
- m_parentHandle = HEntity();
-}
-
-// clearEntityHierarchy and rebuildEntityHierarchy should only be called
-// from UpdateEntityHierarchyJob to update the entity hierarchy for the
-// entire scene at once
-void Entity::rebuildEntityHierarchy()
+void Entity::removeFromParentChildHandles()
{
- if (!m_parentEntityId.isNull())
- setParentHandle(m_nodeManagers->renderNodesManager()->lookupHandle(m_parentEntityId));
- else
- qCDebug(Render::RenderNodes) << Q_FUNC_INFO << "No parent entity found for Entity" << peerId();
+ // remove ourself from our parent's list of children.
+ auto p = parent();
+ if (p)
+ p->removeChildHandle(m_handle);
}
void Entity::appendChildHandle(HEntity childHandle)
diff --git a/src/render/backend/entity_p.h b/src/render/backend/entity_p.h
index 493774feb..403f5568c 100644
--- a/src/render/backend/entity_p.h
+++ b/src/render/backend/entity_p.h
@@ -98,11 +98,8 @@ public:
HEntity handle() const { return m_handle; }
Entity *parent() const;
HEntity parentHandle() const { return m_parentHandle; }
- Qt3DCore::QNodeId parentEntityId() const { return m_parentEntityId; }
-
- void clearEntityHierarchy();
- void rebuildEntityHierarchy();
+ void removeFromParentChildHandles();
void appendChildHandle(HEntity childHandle);
void removeChildHandle(HEntity childHandle) { m_childrenHandles.removeOne(childHandle); }
QVector<HEntity> childrenHandles() const { return m_childrenHandles; }
@@ -185,8 +182,6 @@ private:
HEntity m_parentHandle;
QVector<HEntity > m_childrenHandles;
- Qt3DCore::QNodeId m_parentEntityId;
-
HMatrix m_worldTransform;
QSharedPointer<Sphere> m_localBoundingVolume;
QSharedPointer<Sphere> m_worldBoundingVolume;
@@ -304,7 +299,7 @@ ENTITY_COMPONENT_LIST_TEMPLATE_SPECIALIZATION(ShaderData, HShaderData)
ENTITY_COMPONENT_LIST_TEMPLATE_SPECIALIZATION(Light, HLight)
ENTITY_COMPONENT_LIST_TEMPLATE_SPECIALIZATION(EnvironmentLight, HEnvironmentLight)
-class RenderEntityFunctor : public Qt3DCore::QBackendNodeMapper
+class Q_AUTOTEST_EXPORT RenderEntityFunctor : public Qt3DCore::QBackendNodeMapper
{
public:
explicit RenderEntityFunctor(AbstractRenderer *renderer, NodeManagers *manager);
diff --git a/src/render/jobs/job_common_p.h b/src/render/jobs/job_common_p.h
index 5fe16f933..9c83624b8 100644
--- a/src/render/jobs/job_common_p.h
+++ b/src/render/jobs/job_common_p.h
@@ -109,7 +109,6 @@ namespace JobTypes {
UpdateLayerEntity,
SendTextureChangesToFrontend,
SendSetFenceHandlesToFrontend,
- UpdateEntityHierarchy,
};
} // JobTypes
diff --git a/src/render/jobs/jobs.pri b/src/render/jobs/jobs.pri
index 6cdf891fc..2181e4a95 100644
--- a/src/render/jobs/jobs.pri
+++ b/src/render/jobs/jobs.pri
@@ -30,7 +30,6 @@ HEADERS += \
$$PWD/filterproximitydistancejob_p.h \
$$PWD/abstractpickingjob_p.h \
$$PWD/raycastingjob_p.h \
- $$PWD/updateentityhierarchyjob_p.h \
$$PWD/updateentitylayersjob_p.h
SOURCES += \
@@ -60,6 +59,5 @@ SOURCES += \
$$PWD/filterproximitydistancejob.cpp \
$$PWD/abstractpickingjob.cpp \
$$PWD/raycastingjob.cpp \
- $$PWD/updateentityhierarchyjob.cpp \
$$PWD/updateentitylayersjob.cpp
diff --git a/src/render/jobs/updateentityhierarchyjob.cpp b/src/render/jobs/updateentityhierarchyjob.cpp
deleted file mode 100644
index 7c18514bb..000000000
--- a/src/render/jobs/updateentityhierarchyjob.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "updateentityhierarchyjob_p.h"
-#include <Qt3DRender/private/managers_p.h>
-#include <Qt3DRender/private/nodemanagers_p.h>
-#include <Qt3DRender/private/entity_p.h>
-#include <Qt3DRender/private/job_common_p.h>
-
-QT_BEGIN_NAMESPACE
-
-namespace Qt3DRender {
-
-namespace Render {
-
-UpdateEntityHierarchyJob::UpdateEntityHierarchyJob()
- : m_manager(nullptr)
-{
- SET_JOB_RUN_STAT_TYPE(this, JobTypes::UpdateEntityHierarchy, 0);
-}
-
-void UpdateEntityHierarchyJob::run()
-{
- Q_ASSERT(m_manager);
- EntityManager *entityManager = m_manager->renderNodesManager();
-
- const QVector<HEntity> handles = entityManager->activeHandles();
-
- // Clear the parents and children
- for (const HEntity &handle : handles) {
- Entity *entity = entityManager->data(handle);
- entity->clearEntityHierarchy();
- }
- for (const HEntity &handle : handles) {
- Entity *entity = entityManager->data(handle);
- entity->rebuildEntityHierarchy();
- }
-}
-
-} // Render
-
-} // Qt3DRender
-
-QT_END_NAMESPACE
diff --git a/src/render/jobs/updateentityhierarchyjob_p.h b/src/render/jobs/updateentityhierarchyjob_p.h
deleted file mode 100644
index fd2b13631..000000000
--- a/src/render/jobs/updateentityhierarchyjob_p.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifndef QT3DRENDER_RENDER_UPDATEENTITYHIERARCHYJOB_P_H
-#define QT3DRENDER_RENDER_UPDATEENTITYHIERARCHYJOB_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of other Qt classes. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <Qt3DRender/private/qt3drender_global_p.h>
-#include <Qt3DCore/qaspectjob.h>
-
-QT_BEGIN_NAMESPACE
-
-namespace Qt3DRender {
-
-namespace Render {
-
-class Entity;
-class NodeManagers;
-
-class Q_3DRENDERSHARED_PRIVATE_EXPORT UpdateEntityHierarchyJob: public Qt3DCore::QAspectJob
-{
-public:
- UpdateEntityHierarchyJob();
-
- inline void setManager(NodeManagers *manager) { m_manager = manager; }
- inline NodeManagers *manager() const { return m_manager; }
-
- // QAspectJob interface
- void run() final;
-
-private:
- NodeManagers *m_manager;
-};
-
-
-using UpdateEntityHierarchyJobPtr = QSharedPointer<UpdateEntityHierarchyJob>;
-
-} // Render
-
-} // Qt3DRender
-
-QT_END_NAMESPACE
-
-#endif // QT3DRENDER_RENDER_UPDATEENTITYHIERARCHYJOB_P_H
diff --git a/src/render/renderers/opengl/renderer/renderer.cpp b/src/render/renderers/opengl/renderer/renderer.cpp
index 845a4d8be..2df3d1270 100644
--- a/src/render/renderers/opengl/renderer/renderer.cpp
+++ b/src/render/renderers/opengl/renderer/renderer.cpp
@@ -192,7 +192,6 @@ Renderer::Renderer(QRenderAspect::RenderType type)
, m_updateMeshTriangleListJob(Render::UpdateMeshTriangleListJobPtr::create())
, m_filterCompatibleTechniqueJob(Render::FilterCompatibleTechniqueJobPtr::create())
, m_updateEntityLayersJob(Render::UpdateEntityLayersJobPtr::create())
- , m_updateEntityHierarchyJob(Render::UpdateEntityHierarchyJobPtr::create())
, m_bufferGathererJob(Render::GenericLambdaJobPtr<std::function<void ()>>::create([this] { lookForDirtyBuffers(); }, JobTypes::DirtyBufferGathering))
, m_vaoGathererJob(Render::GenericLambdaJobPtr<std::function<void ()>>::create([this] { lookForAbandonedVaos(); }, JobTypes::DirtyVaoGathering))
, m_textureGathererJob(Render::GenericLambdaJobPtr<std::function<void ()>>::create([this] { lookForDirtyTextures(); }, JobTypes::DirtyTextureGathering))
@@ -213,9 +212,6 @@ Renderer::Renderer(QRenderAspect::RenderType type)
if (m_renderThread)
m_renderThread->waitForStart();
- m_worldTransformJob->addDependency(m_updateEntityHierarchyJob);
- m_updateEntityLayersJob->addDependency(m_updateEntityHierarchyJob);
-
// Create jobs to update transforms and bounding volumes
// We can only update bounding volumes once all world transforms are known
m_updateWorldBoundingVolumeJob->addDependency(m_worldTransformJob);
@@ -304,7 +300,6 @@ void Renderer::setNodeManagers(NodeManagers *managers)
m_filterCompatibleTechniqueJob->setManager(m_nodesManager->techniqueManager());
m_updateEntityLayersJob->setManager(m_nodesManager);
m_updateTreeEnabledJob->setManagers(m_nodesManager);
- m_updateEntityHierarchyJob->setManager(m_nodesManager);
}
void Renderer::setServices(QServiceLocator *services)
@@ -1748,17 +1743,14 @@ QVector<Qt3DCore::QAspectJobPtr> Renderer::renderBinJobs()
// Add jobs
const bool entitiesEnabledDirty = dirtyBitsForFrame & AbstractRenderer::EntityEnabledDirty;
- const bool entityHierarchyNeedsToBeRebuilt = dirtyBitsForFrame & AbstractRenderer::EntityHierarchyDirty;
- if (entitiesEnabledDirty || entityHierarchyNeedsToBeRebuilt) {
+ if (entitiesEnabledDirty) {
renderBinJobs.push_back(m_updateTreeEnabledJob);
// This dependency is added here because we clear all dependencies
// at the start of this function.
m_calculateBoundingVolumeJob->addDependency(m_updateTreeEnabledJob);
- m_calculateBoundingVolumeJob->addDependency(m_updateEntityHierarchyJob);
}
- if (dirtyBitsForFrame & AbstractRenderer::TransformDirty ||
- dirtyBitsForFrame & AbstractRenderer::EntityHierarchyDirty) {
+ if (dirtyBitsForFrame & AbstractRenderer::TransformDirty) {
renderBinJobs.push_back(m_worldTransformJob);
renderBinJobs.push_back(m_updateWorldBoundingVolumeJob);
renderBinJobs.push_back(m_updateShaderDataTransformJob);
@@ -1771,7 +1763,6 @@ QVector<Qt3DCore::QAspectJobPtr> Renderer::renderBinJobs()
}
if (dirtyBitsForFrame & AbstractRenderer::GeometryDirty ||
- dirtyBitsForFrame & AbstractRenderer::EntityHierarchyDirty ||
dirtyBitsForFrame & AbstractRenderer::TransformDirty) {
renderBinJobs.push_back(m_expandBoundingVolumeJob);
}
@@ -1798,7 +1789,7 @@ QVector<Qt3DCore::QAspectJobPtr> Renderer::renderBinJobs()
// Layer cache is dependent on layers, layer filters (hence FG structure
// changes) and the enabled flag on entities
const bool frameGraphDirty = dirtyBitsForFrame & AbstractRenderer::FrameGraphDirty;
- const bool layersDirty = dirtyBitsForFrame & AbstractRenderer::LayersDirty || entityHierarchyNeedsToBeRebuilt;
+ const bool layersDirty = dirtyBitsForFrame & AbstractRenderer::LayersDirty;
const bool layersCacheNeedsToBeRebuilt = layersDirty || entitiesEnabledDirty || frameGraphDirty;
const bool materialDirty = dirtyBitsForFrame & AbstractRenderer::MaterialDirty;
const bool lightsDirty = dirtyBitsForFrame & AbstractRenderer::LightsDirty;
@@ -1806,10 +1797,6 @@ QVector<Qt3DCore::QAspectJobPtr> Renderer::renderBinJobs()
const bool renderableDirty = dirtyBitsForFrame & AbstractRenderer::GeometryDirty;
const bool materialCacheNeedsToBeRebuilt = materialDirty || frameGraphDirty;
- // Rebuild Entity Hierarchy if dirty
- if (entityHierarchyNeedsToBeRebuilt)
- renderBinJobs.push_back(m_updateEntityHierarchyJob);
-
// Rebuild Entity Layers list if layers are dirty
if (layersDirty)
renderBinJobs.push_back(m_updateEntityLayersJob);
diff --git a/src/render/renderers/opengl/renderer/renderer_p.h b/src/render/renderers/opengl/renderer/renderer_p.h
index 0f911236a..bfab85e4f 100644
--- a/src/render/renderers/opengl/renderer/renderer_p.h
+++ b/src/render/renderers/opengl/renderer/renderer_p.h
@@ -78,7 +78,6 @@
#include <Qt3DRender/private/filtercompatibletechniquejob_p.h>
#include <Qt3DRender/private/updateskinningpalettejob_p.h>
#include <Qt3DRender/private/updateentitylayersjob_p.h>
-#include <Qt3DRender/private/updateentityhierarchyjob_p.h>
#include <Qt3DRender/private/renderercache_p.h>
#include <Qt3DRender/private/texture_p.h>
#include <Qt3DRender/private/glfence_p.h>
@@ -368,7 +367,6 @@ private:
UpdateMeshTriangleListJobPtr m_updateMeshTriangleListJob;
FilterCompatibleTechniqueJobPtr m_filterCompatibleTechniqueJob;
UpdateEntityLayersJobPtr m_updateEntityLayersJob;
- UpdateEntityHierarchyJobPtr m_updateEntityHierarchyJob;
QVector<Qt3DCore::QNodeId> m_pendingRenderCaptureSendRequests;
diff --git a/tests/auto/render/boundingsphere/tst_boundingsphere.cpp b/tests/auto/render/boundingsphere/tst_boundingsphere.cpp
index f1c228f17..80298780a 100644
--- a/tests/auto/render/boundingsphere/tst_boundingsphere.cpp
+++ b/tests/auto/render/boundingsphere/tst_boundingsphere.cpp
@@ -55,7 +55,6 @@
#include <Qt3DRender/private/calcboundingvolumejob_p.h>
#include <Qt3DRender/private/calcgeometrytrianglevolumes_p.h>
#include <Qt3DRender/private/loadbufferjob_p.h>
-#include <Qt3DRender/private/updateentityhierarchyjob_p.h>
#include <Qt3DRender/private/buffermanager_p.h>
#include <Qt3DRender/private/geometryrenderermanager_p.h>
#include <Qt3DRender/private/sphere_p.h>
@@ -157,10 +156,6 @@ namespace {
void runRequiredJobs(Qt3DRender::TestAspect *test)
{
- Qt3DRender::Render::UpdateEntityHierarchyJob updateEntitiesJob;
- updateEntitiesJob.setManager(test->nodeManagers());
- updateEntitiesJob.run();
-
Qt3DRender::Render::UpdateWorldTransformJob updateWorldTransform;
updateWorldTransform.setRoot(test->sceneRoot());
updateWorldTransform.setManagers(test->nodeManagers());
diff --git a/tests/auto/render/entity/tst_entity.cpp b/tests/auto/render/entity/tst_entity.cpp
index 7e5150a77..463fbbb79 100644
--- a/tests/auto/render/entity/tst_entity.cpp
+++ b/tests/auto/render/entity/tst_entity.cpp
@@ -182,7 +182,6 @@ private slots:
entity.cleanup();
// THEN
- QVERIFY(entity.parentEntityId().isNull());
QVERIFY(entity.componentUuid<Transform>().isNull());
QVERIFY(entity.componentUuid<CameraLens>().isNull());
QVERIFY(entity.componentUuid<Material>().isNull());
@@ -201,29 +200,18 @@ private slots:
QVERIFY(!containsAll);
}
- void checkRebuildingEntityHierarchy()
+ void checkEntityReparenting()
{
// GIVEN
TestRenderer renderer;
NodeManagers nodeManagers;
Qt3DCore::QEntity frontendEntityA, frontendEntityB, frontendEntityC;
- auto entityCreator = [&nodeManagers, &renderer](const Qt3DCore::QEntity &frontEndEntity) {
- Entity *entity = nodeManagers.renderNodesManager()->getOrCreateResource(frontEndEntity.id());
- entity->setNodeManagers(&nodeManagers);
- entity->setRenderer(&renderer);
- return entity;
- };
-
- auto backendA = entityCreator(frontendEntityA);
- auto backendB = entityCreator(frontendEntityB);
- auto backendC = entityCreator(frontendEntityC);
+ auto backendA = createEntity(renderer, nodeManagers, frontendEntityA);
+ auto backendB = createEntity(renderer, nodeManagers, frontendEntityB);
+ auto backendC = createEntity(renderer, nodeManagers, frontendEntityC);
// THEN
- QVERIFY(backendA->parentEntityId().isNull());
- QVERIFY(backendB->parentEntityId().isNull());
- QVERIFY(backendC->parentEntityId().isNull());
-
QVERIFY(backendA->parent() == nullptr);
QVERIFY(backendB->parent() == nullptr);
QVERIFY(backendC->parent() == nullptr);
@@ -233,9 +221,6 @@ private slots:
QVERIFY(backendC->childrenHandles().isEmpty());
// WHEN
- renderer.clearDirtyBits(0);
- QVERIFY(renderer.dirtyBits() == 0);
-
auto sendParentChange = [&nodeManagers](const Qt3DCore::QEntity &entity) {
Entity *backendEntity = nodeManagers.renderNodesManager()->getOrCreateResource(entity.id());
backendEntity->syncFromFrontEnd(&entity, false);
@@ -248,68 +233,111 @@ private slots:
sendParentChange(frontendEntityC);
// THEN
- QVERIFY(renderer.dirtyBits() & AbstractRenderer::EntityHierarchyDirty);
+ QVERIFY(backendA->parent() == nullptr);
+ QVERIFY(backendB->parent() == backendA);
+ QVERIFY(backendC->parent() == backendB);
- QVERIFY(backendA->parentEntityId().isNull());
- QVERIFY(backendB->parentEntityId() == frontendEntityA.id());
- QVERIFY(backendC->parentEntityId() == frontendEntityB.id());
+ QCOMPARE(backendA->childrenHandles().count(), 1);
+ QCOMPARE(backendB->childrenHandles().count(), 1);
+ QVERIFY(backendC->childrenHandles().isEmpty());
+ // WHEN - reparent C to A
+ frontendEntityC.setParent(&frontendEntityA);
+ sendParentChange(frontendEntityC);
+
+ // THEN
+ QVERIFY(backendA->parent() == nullptr);
+ QVERIFY(backendB->parent() == backendA);
+ QVERIFY(backendC->parent() == backendA);
+
+ QCOMPARE(backendA->childrenHandles().size(), 2);
+ QVERIFY(backendB->childrenHandles().isEmpty());
+ QVERIFY(backendC->childrenHandles().isEmpty());
+
+ // WHEN - reparent B to null.
+ frontendEntityB.setParent(static_cast<Qt3DCore::QNode *>(nullptr));
+ sendParentChange(frontendEntityB);
+
+ // THEN
QVERIFY(backendA->parent() == nullptr);
QVERIFY(backendB->parent() == nullptr);
- QVERIFY(backendC->parent() == nullptr);
+ QVERIFY(backendC->parent() == backendA);
- QVERIFY(backendA->childrenHandles().isEmpty());
+ QCOMPARE(backendA->childrenHandles().count(), 1);
+ QVERIFY(!backendA->childrenHandles().contains(backendB->handle()));
QVERIFY(backendB->childrenHandles().isEmpty());
QVERIFY(backendC->childrenHandles().isEmpty());
+ }
+
+ void checkEntityCleanup()
+ {
+ // GIVEN
+ TestRenderer renderer;
+ NodeManagers nodeManagers;
+ Qt3DCore::QEntity frontendEntityA, frontendEntityB, frontendEntityC;
+
+ auto backendA = createEntity(renderer, nodeManagers, frontendEntityA);
+ auto backendB = createEntity(renderer, nodeManagers, frontendEntityB);
+ auto backendC = createEntity(renderer, nodeManagers, frontendEntityC);
// WHEN
- auto rebuildHierarchy = [](Entity *backend) {
- backend->clearEntityHierarchy();
- backend->rebuildEntityHierarchy();
+ auto sendParentChange = [&nodeManagers](const Qt3DCore::QEntity &entity) {
+ Entity *backendEntity = nodeManagers.renderNodesManager()->getOrCreateResource(entity.id());
+ backendEntity->syncFromFrontEnd(&entity, false);
};
- rebuildHierarchy(backendA);
- rebuildHierarchy(backendB);
- rebuildHierarchy(backendC);
+
+ // reparent B and C to A.
+ frontendEntityB.setParent(&frontendEntityA);
+ sendParentChange(frontendEntityB);
+ frontendEntityC.setParent(&frontendEntityA);
+ sendParentChange(frontendEntityC);
// THEN
QVERIFY(backendA->parent() == nullptr);
QVERIFY(backendB->parent() == backendA);
- QVERIFY(backendC->parent() == backendB);
+ QVERIFY(backendC->parent() == backendA);
- QVERIFY(!backendA->childrenHandles().isEmpty());
- QVERIFY(!backendB->childrenHandles().isEmpty());
+ QCOMPARE(backendA->childrenHandles().count(), 2);
+ QVERIFY(backendB->childrenHandles().isEmpty());
QVERIFY(backendC->childrenHandles().isEmpty());
- // WHEN - reparent B to null.
- frontendEntityB.setParent(static_cast<Qt3DCore::QNode *>(nullptr));
- sendParentChange(frontendEntityB);
- rebuildHierarchy(backendA);
- rebuildHierarchy(backendB);
- rebuildHierarchy(backendC);
+ // WHEN - cleaning up a child
+ backendC->cleanup();
+
+ // THEN - the child's parent should be null and it
+ // should be removed from its parent's list of children
+ QVERIFY(backendA->parent() == nullptr);
+ QVERIFY(backendB->parent() == backendA);
+ QVERIFY(backendC->parent() == nullptr);
+
+ QCOMPARE(backendA->childrenHandles().count(), 1);
+ QVERIFY(!backendA->childrenHandles().contains(backendC->handle()));
+ QVERIFY(backendB->childrenHandles().isEmpty());
+ QVERIFY(backendC->childrenHandles().isEmpty());
- QVERIFY(backendA->parentEntityId().isNull());
- QVERIFY(backendB->parentEntityId().isNull());
- QVERIFY(backendC->parentEntityId() == frontendEntityB.id());
+ // WHEN (cleaning up parent)
+ backendA->cleanup();
+ // THEN (it's children's parent should be set to null)
QVERIFY(backendA->parent() == nullptr);
QVERIFY(backendB->parent() == nullptr);
- QVERIFY(backendC->parent() == backendB);
+ QVERIFY(backendC->parent() == nullptr);
QVERIFY(backendA->childrenHandles().isEmpty());
- QVERIFY(!backendB->childrenHandles().isEmpty());
+ QVERIFY(backendB->childrenHandles().isEmpty());
QVERIFY(backendC->childrenHandles().isEmpty());
- // WHEN - cleanup
- backendA->cleanup();
+ // WHEN
backendB->cleanup();
- backendC->cleanup();
- // THEN
- QVERIFY(backendA->parentEntityId().isNull());
- QVERIFY(backendB->parentEntityId().isNull());
- QVERIFY(backendC->parentEntityId().isNull());
+ // THEN nothing should change
+ QVERIFY(backendA->childrenHandles().isEmpty());
+ QVERIFY(backendB->childrenHandles().isEmpty());
+ QVERIFY(backendC->childrenHandles().isEmpty());
- QVERIFY(renderer.dirtyBits() != 0);
+ QVERIFY(backendA->parent() == nullptr);
+ QVERIFY(backendB->parent() == nullptr);
+ QVERIFY(backendC->parent() == nullptr);
}
void shouldHandleSingleComponentEvents_data()
@@ -441,19 +469,9 @@ private slots:
NodeManagers nodeManagers;
Qt3DCore::QEntity frontendEntityA, frontendEntityB, frontendEntityC;
- auto entityCreator = [&nodeManagers, &renderer](const Qt3DCore::QEntity &frontEndEntity) {
- HEntity renderNodeHandle = nodeManagers.renderNodesManager()->getOrAcquireHandle(frontEndEntity.id());
- Entity *entity = nodeManagers.renderNodesManager()->data(renderNodeHandle);
- entity->setNodeManagers(&nodeManagers);
- entity->setHandle(renderNodeHandle);
- entity->setRenderer(&renderer);
- entity->syncFromFrontEnd(&frontEndEntity, true);
- return entity;
- };
-
- auto backendA = entityCreator(frontendEntityA);
- auto backendB = entityCreator(frontendEntityB);
- auto backendC = entityCreator(frontendEntityC);
+ auto backendA = createEntity(renderer, nodeManagers, frontendEntityA);
+ auto backendB = createEntity(renderer, nodeManagers, frontendEntityB);
+ auto backendC = createEntity(renderer, nodeManagers, frontendEntityC);
auto sendParentChange = [&nodeManagers](const Qt3DCore::QEntity &entity) {
Entity *backendEntity = nodeManagers.renderNodesManager()->getOrCreateResource(entity.id());
@@ -466,14 +484,6 @@ private slots:
frontendEntityC.setParent(&frontendEntityB);
sendParentChange(frontendEntityC);
- auto rebuildHierarchy = [](Entity *backend) {
- backend->clearEntityHierarchy();
- backend->rebuildEntityHierarchy();
- };
- rebuildHierarchy(backendA);
- rebuildHierarchy(backendB);
- rebuildHierarchy(backendC);
-
// WHEN
int visitCount = 0;
auto counter = [&visitCount](const Entity *) { ++visitCount; };
@@ -494,19 +504,9 @@ private slots:
frontendEntityB.setEnabled(false);
frontendEntityC.setEnabled(false);
- auto entityCreator = [&nodeManagers, &renderer](const Qt3DCore::QEntity &frontEndEntity) {
- HEntity renderNodeHandle = nodeManagers.renderNodesManager()->getOrAcquireHandle(frontEndEntity.id());
- Entity *entity = nodeManagers.renderNodesManager()->data(renderNodeHandle);
- entity->setNodeManagers(&nodeManagers);
- entity->setHandle(renderNodeHandle);
- entity->setRenderer(&renderer);
- entity->syncFromFrontEnd(&frontEndEntity, true);
- return entity;
- };
-
- auto backendA = entityCreator(frontendEntityA);
- auto backendB = entityCreator(frontendEntityB);
- auto backendC = entityCreator(frontendEntityC);
+ auto backendA = createEntity(renderer, nodeManagers, frontendEntityA);
+ auto backendB = createEntity(renderer, nodeManagers, frontendEntityB);
+ auto backendC = createEntity(renderer, nodeManagers, frontendEntityC);
auto sendParentChange = [&nodeManagers](const Qt3DCore::QEntity &entity) {
Entity *backendEntity = nodeManagers.renderNodesManager()->getOrCreateResource(entity.id());
@@ -519,14 +519,6 @@ private slots:
frontendEntityC.setParent(&frontendEntityB);
sendParentChange(frontendEntityC);
- auto rebuildHierarchy = [](Entity *backend) {
- backend->clearEntityHierarchy();
- backend->rebuildEntityHierarchy();
- };
- rebuildHierarchy(backendA);
- rebuildHierarchy(backendB);
- rebuildHierarchy(backendC);
-
// WHEN
CompleteVisitor v1(&nodeManagers);
EnabledVisitor v2(&nodeManagers);
@@ -553,19 +545,9 @@ private slots:
frontendEntityB.setEnabled(false);
frontendEntityC.setEnabled(false);
- auto entityCreator = [&nodeManagers, &renderer](const Qt3DCore::QEntity &frontEndEntity) {
- HEntity renderNodeHandle = nodeManagers.renderNodesManager()->getOrAcquireHandle(frontEndEntity.id());
- Entity *entity = nodeManagers.renderNodesManager()->data(renderNodeHandle);
- entity->setNodeManagers(&nodeManagers);
- entity->setHandle(renderNodeHandle);
- entity->setRenderer(&renderer);
- entity->syncFromFrontEnd(&frontEndEntity, true);
- return entity;
- };
-
- auto backendA = entityCreator(frontendEntityA);
- auto backendB = entityCreator(frontendEntityB);
- auto backendC = entityCreator(frontendEntityC);
+ auto backendA = createEntity(renderer, nodeManagers, frontendEntityA);
+ auto backendB = createEntity(renderer, nodeManagers, frontendEntityB);
+ auto backendC = createEntity(renderer, nodeManagers, frontendEntityC);
auto sendParentChange = [&nodeManagers](const Qt3DCore::QEntity &entity) {
Entity *backendEntity = nodeManagers.renderNodesManager()->getOrCreateResource(entity.id());
@@ -578,14 +560,6 @@ private slots:
frontendEntityC.setParent(&frontendEntityB);
sendParentChange(frontendEntityC);
- auto rebuildHierarchy = [](Entity *backend) {
- backend->clearEntityHierarchy();
- backend->rebuildEntityHierarchy();
- };
- rebuildHierarchy(backendA);
- rebuildHierarchy(backendB);
- rebuildHierarchy(backendC);
-
// WHEN
EntityAccumulator v1(&nodeManagers);
EntityAccumulator v2([](Entity *e) { return e->isEnabled(); }, &nodeManagers);
@@ -596,6 +570,18 @@ private slots:
QCOMPARE(r1.count(), 3);
QCOMPARE(r2.count(), 0);
}
+
+private:
+ Entity *createEntity(TestRenderer &renderer, NodeManagers &nodeManagers, const Qt3DCore::QEntity &frontEndEntity) {
+ HEntity renderNodeHandle = nodeManagers.renderNodesManager()->getOrAcquireHandle(frontEndEntity.id());
+ Entity *entity = nodeManagers.renderNodesManager()->data(renderNodeHandle);
+ entity->setNodeManagers(&nodeManagers);
+ entity->setHandle(renderNodeHandle);
+ entity->setRenderer(&renderer);
+ entity->syncFromFrontEnd(&frontEndEntity, true);
+ return entity;
+ }
+
};
QTEST_APPLESS_MAIN(tst_RenderEntity)
diff --git a/tests/auto/render/layerfiltering/tst_layerfiltering.cpp b/tests/auto/render/layerfiltering/tst_layerfiltering.cpp
index 8c72829e0..255ff5ea8 100644
--- a/tests/auto/render/layerfiltering/tst_layerfiltering.cpp
+++ b/tests/auto/render/layerfiltering/tst_layerfiltering.cpp
@@ -33,7 +33,6 @@
#include <Qt3DRender/private/entity_p.h>
#include <Qt3DRender/private/filterlayerentityjob_p.h>
#include <Qt3DRender/private/updatetreeenabledjob_p.h>
-#include <Qt3DRender/private/updateentityhierarchyjob_p.h>
#include <Qt3DRender/qlayer.h>
#include <Qt3DRender/qlayerfilter.h>
#include "testaspect.h"
@@ -634,10 +633,6 @@ private Q_SLOTS:
// WHEN
Qt3DRender::Render::Entity *backendRoot = aspect->nodeManagers()->renderNodesManager()->getOrCreateResource(entitySubtree->id());
- Qt3DRender::Render::UpdateEntityHierarchyJob updateEntitiesJob;
- updateEntitiesJob.setManager(aspect->nodeManagers());
- updateEntitiesJob.run();
-
Qt3DRender::Render::UpdateTreeEnabledJob updateTreeEnabledJob;
updateTreeEnabledJob.setRoot(backendRoot);
updateTreeEnabledJob.setManagers(aspect->nodeManagers());
diff --git a/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp b/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp
index a8ffa9712..1fbdc4d04 100644
--- a/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp
+++ b/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp
@@ -48,7 +48,6 @@
#include <Qt3DRender/private/qrenderaspect_p.h>
#include <Qt3DRender/private/pickboundingvolumejob_p.h>
#include <Qt3DRender/private/pickboundingvolumeutils_p.h>
-#include <Qt3DRender/private/updateentityhierarchyjob_p.h>
#include <Qt3DRender/private/updatemeshtrianglelistjob_p.h>
#include <Qt3DRender/private/updateworldboundingvolumejob_p.h>
#include <Qt3DRender/private/updateworldtransformjob_p.h>
@@ -150,10 +149,6 @@ namespace {
void runRequiredJobs(Qt3DRender::TestAspect *test)
{
- Qt3DRender::Render::UpdateEntityHierarchyJob updateEntitiesJob;
- updateEntitiesJob.setManager(test->nodeManagers());
- updateEntitiesJob.run();
-
Qt3DRender::Render::UpdateWorldTransformJob updateWorldTransform;
updateWorldTransform.setRoot(test->sceneRoot());
updateWorldTransform.setManagers(test->nodeManagers());
diff --git a/tests/auto/render/proximityfiltering/tst_proximityfiltering.cpp b/tests/auto/render/proximityfiltering/tst_proximityfiltering.cpp
index c8d862b2e..07adf12b5 100644
--- a/tests/auto/render/proximityfiltering/tst_proximityfiltering.cpp
+++ b/tests/auto/render/proximityfiltering/tst_proximityfiltering.cpp
@@ -247,10 +247,6 @@ private Q_SLOTS:
// WHEN
Qt3DRender::Render::Entity *backendRoot = aspect->nodeManagers()->renderNodesManager()->getOrCreateResource(entitySubtree->id());
- Qt3DRender::Render::UpdateEntityHierarchyJob updateEntitiesJob;
- updateEntitiesJob.setManager(aspect->nodeManagers());
- updateEntitiesJob.run();
-
Qt3DRender::Render::UpdateTreeEnabledJob updateTreeEnabledJob;
updateTreeEnabledJob.setRoot(backendRoot);
updateTreeEnabledJob.setManagers(aspect->nodeManagers());
diff --git a/tests/auto/render/qcamera/tst_qcamera.cpp b/tests/auto/render/qcamera/tst_qcamera.cpp
index 4d424a420..229dff565 100644
--- a/tests/auto/render/qcamera/tst_qcamera.cpp
+++ b/tests/auto/render/qcamera/tst_qcamera.cpp
@@ -34,7 +34,6 @@
#include <qbackendnodetester.h>
#include <Qt3DCore/QEntity>
-#include <Qt3DRender/private/updateentityhierarchyjob_p.h>
#include <Qt3DCore/private/qaspectjobmanager_p.h>
#include <Qt3DCore/private/qnodevisitor_p.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
@@ -141,10 +140,6 @@ namespace {
void runRequiredJobs(Qt3DRender::TestAspect *test)
{
- Qt3DRender::Render::UpdateEntityHierarchyJob updateEntitiesJob;
- updateEntitiesJob.setManager(test->nodeManagers());
- updateEntitiesJob.run();
-
Qt3DRender::Render::UpdateWorldTransformJob updateWorldTransform;
updateWorldTransform.setRoot(test->sceneRoot());
updateWorldTransform.setManagers(test->nodeManagers());
diff --git a/tests/auto/render/raycastingjob/tst_raycastingjob.cpp b/tests/auto/render/raycastingjob/tst_raycastingjob.cpp
index bc4f2910e..e45ec704e 100644
--- a/tests/auto/render/raycastingjob/tst_raycastingjob.cpp
+++ b/tests/auto/render/raycastingjob/tst_raycastingjob.cpp
@@ -52,7 +52,6 @@
#include <Qt3DRender/private/updateworldtransformjob_p.h>
#include <Qt3DRender/private/expandboundingvolumejob_p.h>
#include <Qt3DRender/private/calcboundingvolumejob_p.h>
-#include <Qt3DRender/private/updateentityhierarchyjob_p.h>
#include <Qt3DRender/private/calcgeometrytrianglevolumes_p.h>
#include <Qt3DRender/private/loadbufferjob_p.h>
#include <Qt3DRender/private/buffermanager_p.h>
@@ -147,10 +146,6 @@ namespace {
void runRequiredJobs(Qt3DRender::TestAspect *test)
{
- Qt3DRender::Render::UpdateEntityHierarchyJob updateEntitiesJob;
- updateEntitiesJob.setManager(test->nodeManagers());
- updateEntitiesJob.run();
-
Qt3DRender::Render::UpdateWorldTransformJob updateWorldTransform;
updateWorldTransform.setRoot(test->sceneRoot());
updateWorldTransform.setManagers(test->nodeManagers());
diff --git a/tests/auto/render/renderer/tst_renderer.cpp b/tests/auto/render/renderer/tst_renderer.cpp
index a823c233a..973192d6a 100644
--- a/tests/auto/render/renderer/tst_renderer.cpp
+++ b/tests/auto/render/renderer/tst_renderer.cpp
@@ -315,30 +315,6 @@ private Q_SLOTS:
renderQueue->reset();
// WHEN
- renderer.markDirty(Qt3DRender::Render::AbstractRenderer::EntityHierarchyDirty, nullptr);
- jobs = renderer.renderBinJobs();
-
- // THEN
- QCOMPARE(jobs.size(),
- 1 + // EntityEnabledDirty
- 1 + // EntityHierarchyJob
- 1 + // WorldTransformJob
- 1 + // UpdateWorldBoundingVolume
- 1 + // UpdateShaderDataTransform
- 1 + // ExpandBoundingVolumeJob
- 1 + // UpdateEntityLayersJob
- 1 + // updateLevelOfDetailJob
- 1 + // syncLoadingJobs
- 1 + // updateSkinningPaletteJob
- 1 + // cleanupJob
- 1 + // sendBufferCaptureJob
- singleRenderViewJobCount +
- layerCacheJobCount);
-
- renderer.clearDirtyBits(Qt3DRender::Render::AbstractRenderer::AllDirty);
- renderQueue->reset();
-
- // WHEN
renderer.markDirty(Qt3DRender::Render::AbstractRenderer::AllDirty, nullptr);
jobs = renderer.renderBinJobs();
@@ -346,7 +322,6 @@ private Q_SLOTS:
// and ShaderGathererJob are not added here)
QCOMPARE(jobs.size(),
1 + // EntityEnabledDirty
- 1 + // EntityHierarchyDirty
1 + // WorldTransformJob
1 + // UpdateWorldBoundingVolume
1 + // UpdateShaderDataTransform
diff --git a/tests/auto/render/updateshaderdatatransformjob/tst_updateshaderdatatransformjob.cpp b/tests/auto/render/updateshaderdatatransformjob/tst_updateshaderdatatransformjob.cpp
index 0d900a202..492aa0fde 100644
--- a/tests/auto/render/updateshaderdatatransformjob/tst_updateshaderdatatransformjob.cpp
+++ b/tests/auto/render/updateshaderdatatransformjob/tst_updateshaderdatatransformjob.cpp
@@ -29,7 +29,6 @@
#include <QtTest/QTest>
#include <Qt3DRender/private/updateshaderdatatransformjob_p.h>
#include <Qt3DRender/private/updateworldtransformjob_p.h>
-#include <Qt3DRender/private/updateentityhierarchyjob_p.h>
#include <Qt3DRender/private/nodemanagers_p.h>
#include <Qt3DRender/private/managers_p.h>
#include <Qt3DRender/qrenderaspect.h>
@@ -129,10 +128,6 @@ namespace {
void runRequiredJobs(Qt3DRender::TestAspect *test)
{
- Qt3DRender::Render::UpdateEntityHierarchyJob updateEntitiesJob;
- updateEntitiesJob.setManager(test->nodeManagers());
- updateEntitiesJob.run();
-
Qt3DRender::Render::UpdateWorldTransformJob updateWorldTransform;
updateWorldTransform.setRoot(test->sceneRoot());
updateWorldTransform.setManagers(test->nodeManagers());