summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2019-12-07 20:37:43 +0000
committerMike Krus <mike.krus@kdab.com>2019-12-16 09:37:14 +0000
commit94e79666cc987fcc928d43f7f82b8c7b9d4c4acc (patch)
tree16b0e307b5fe73720e65ec177d01ebb4be1ad6ab /tests
parente77c85a20080e183e8ed9efd0080aee8f03a75d4 (diff)
Update textures and disables in postJobs
Work was done in postFrame() in main thread anyway, so reduce amount of jobs slightly Change-Id: I8bbb3efcaf9246eb8df1033bde133bc16233f889 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/render/computecommand/tst_computecommand.cpp8
-rw-r--r--tests/auto/render/renderer/tst_renderer.cpp23
2 files changed, 1 insertions, 30 deletions
diff --git a/tests/auto/render/computecommand/tst_computecommand.cpp b/tests/auto/render/computecommand/tst_computecommand.cpp
index 2046ecc76..4dc6b4436 100644
--- a/tests/auto/render/computecommand/tst_computecommand.cpp
+++ b/tests/auto/render/computecommand/tst_computecommand.cpp
@@ -54,11 +54,6 @@ public:
~tst_Renderer() {
shutdown();
}
-
- Qt3DRender::Render::SynchronizerPostFramePtr sendDisablesToFrontendJob() const
- {
- return m_sendDisablesToFrontendJob;
- }
};
@@ -337,8 +332,7 @@ private Q_SLOTS:
QCOMPARE(computeCommand.isEnabled(), true);
// WHEN
- auto sendDisablesJob = renderer.sendDisablesToFrontendJob();
- Qt3DCore::QAspectJobPrivate::get(sendDisablesJob.data())->postFrame(&manager);
+ renderer.jobsDone(&manager); // so Renderer::sendDisablesToFrontend gets called
// THEN
QCOMPARE(computeCommand.isEnabled(), false);
diff --git a/tests/auto/render/renderer/tst_renderer.cpp b/tests/auto/render/renderer/tst_renderer.cpp
index ede95fe14..0cbc1aefc 100644
--- a/tests/auto/render/renderer/tst_renderer.cpp
+++ b/tests/auto/render/renderer/tst_renderer.cpp
@@ -100,20 +100,6 @@ private Q_SLOTS:
1); // SendSetFenceHandlesJob
// Note: pending set fence handles are only cleared when the job is run
- // WHEN
- renderer.m_updatedTextureProperties.push_back({{}, {}});
- jobs = renderer.preRenderingJobs();
-
- // THEN
- QCOMPARE(jobs.size(),
- 1 + // PickBoundingVolumeJob
- 1 + // RayCastingJob
- 1 + // SendBufferCaptureJob
- 1 + // SendSetFenceHandlesJob
- 1); // SendTextureChangesToFrontend
-
- // Note: pending texture changes are only cleared when the job is run
-
// Properly shutdown command thread
renderer.shutdown();
}
@@ -182,7 +168,6 @@ private Q_SLOTS:
1 + // SyncLoadingJobs
1 + // updateLevelOfDetailJob
1 + // cleanupJob
- 1 + // sendDisablesToFrontend
1 + // VAOGatherer
1 + // BufferGathererJob
1 + // TexturesGathererJob
@@ -212,7 +197,6 @@ private Q_SLOTS:
1 + // VAOGatherer
1 + // updateSkinningPaletteJob
1 + // SyncLoadingJobs
- 1 + // sendDisablesToFrontend
singleRenderViewJobCount +
singleRenderViewCommandRebuildJobCount +
renderViewBuilderMaterialCacheJobCount +
@@ -233,7 +217,6 @@ private Q_SLOTS:
1 + // VAOGatherer
1 + // updateSkinningPaletteJob
1 + // SyncLoadingJobs
- 1 + // sendDisablesToFrontend
singleRenderViewJobCount +
singleRenderViewCommandRebuildJobCount +
renderViewBuilderMaterialCacheJobCount +
@@ -253,7 +236,6 @@ private Q_SLOTS:
1 + // VAOGatherer
1 + // updateSkinningPaletteJob
1 + // SyncLoadingJobs
- 1 + // sendDisablesToFrontend
1 + // EntityEnabledDirty
singleRenderViewJobCount +
layerCacheJobCount);
@@ -275,7 +257,6 @@ private Q_SLOTS:
1 + // UpdateShaderDataTransform
1 + // updateSkinningPaletteJob
1 + // SyncLoadingJobs
- 1 + // sendDisablesToFrontend
1 + // ExpandBoundingVolumeJob
singleRenderViewJobCount);
@@ -293,7 +274,6 @@ private Q_SLOTS:
1 + // VAOGatherer
1 + // updateSkinningPaletteJob
1 + // SyncLoadingJobs
- 1 + // sendDisablesToFrontend
singleRenderViewJobCount +
singleRenderViewCommandRebuildJobCount +
renderViewBuilderMaterialCacheJobCount);
@@ -317,7 +297,6 @@ private Q_SLOTS:
1 + // ExpandBoundingVolumeJob
1 + // RenderableEntityFilterPtr
1 + // SyncRenderableEntities
- 1 + // sendDisablesToFrontend
singleRenderViewCommandRebuildJobCount +
singleRenderViewJobCount);
@@ -338,7 +317,6 @@ private Q_SLOTS:
1 + // CalculateBoundingVolumeJob
1 + // UpdateMeshTriangleListJob
1 + // BufferGathererJob
- 1 + // sendDisablesToFrontend
singleRenderViewJobCount);
renderer.clearDirtyBits(Qt3DRender::Render::AbstractRenderer::AllDirty);
@@ -356,7 +334,6 @@ private Q_SLOTS:
1 + // TexturesGathererJob
1 + // updateSkinningPaletteJob
1 + // SyncTexturesGathererJob
- 1 + // sendDisablesToFrontend
singleRenderViewJobCount);
renderer.clearDirtyBits(Qt3DRender::Render::AbstractRenderer::AllDirty);