diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2024-01-22 21:57:04 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2024-02-22 05:34:48 +0000 |
commit | 504c76c914bd06de010af480602f6d27551bcda6 (patch) | |
tree | 101f8dbd379a8918b641502133d53c9c1be07291 | |
parent | 9147dedeaec429b01049eeca152b95a64466a717 (diff) | |
parent | ef051d6a341bd8e426715421622ed8d63d2afb40 (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-6.2.8' into tqtc/lts-6.2-opensource
Conflicts solved in a file:
dependencies.yaml
Change-Id: I7436e415d509594cb8a50a60cc0228c6d32e048e
-rw-r--r-- | .cmake.conf | 2 | ||||
-rw-r--r-- | .qmake.conf | 2 | ||||
-rw-r--r-- | dependencies.yaml | 6 | ||||
-rw-r--r-- | src/3rdparty/imgui/qt_attribution.json | 2 | ||||
-rw-r--r-- | src/extras/text/qdistancefieldglyphcache.cpp | 23 | ||||
-rw-r--r-- | src/extras/text/qtext2dentity.cpp | 3 | ||||
-rw-r--r-- | src/render/configure.cmake | 2 | ||||
-rw-r--r-- | src/render/materialsystem/prototypes/default.json | 3 | ||||
-rw-r--r-- | src/render/shadergraph/qshadernodesloader.cpp | 8 | ||||
-rw-r--r-- | tests/auto/core/qaspectjob/tst_qaspectjob.cpp | 4 | ||||
-rw-r--r-- | tests/auto/extras/qtext2dentity/tst_qtext2dentity.cpp | 2 | ||||
-rw-r--r-- | tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp | 2 | ||||
-rw-r--r-- | tests/auto/render/opengl/renderviews/tst_renderviews.cpp | 8 | ||||
-rw-r--r-- | tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp | 4 |
14 files changed, 44 insertions, 27 deletions
diff --git a/.cmake.conf b/.cmake.conf index 07d90b8ad..e62fae5ef 100644 --- a/.cmake.conf +++ b/.cmake.conf @@ -1,2 +1,2 @@ -set(QT_REPO_MODULE_VERSION "6.2.7") +set(QT_REPO_MODULE_VERSION "6.2.8") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "") diff --git a/.qmake.conf b/.qmake.conf index c067d2331..0f4b9bb42 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -6,4 +6,4 @@ load(qt_build_config) DEFINES += QT_NO_FOREACH DEFINES += QT_NO_JAVA_STYLE_ITERATORS -MODULE_VERSION = 6.2.7 +MODULE_VERSION = 6.2.8 diff --git a/dependencies.yaml b/dependencies.yaml index 3102e381b..46ce3dd9c 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -1,10 +1,10 @@ dependencies: ../tqtc-qtbase: - ref: 694575a59b5370afc494fbf700eee8db1d1ec091 + ref: 67934c103800bae50c2ec1977758d40fa8e4e507 required: true ../tqtc-qtdeclarative: - ref: 02277e3753613d9e19bbb36367c7d2b1d13d7545 + ref: 302ab20d46280e11042f3896460c55d8b8146e41 required: false ../tqtc-qtshadertools: - ref: 5de9eb91f047e8001ac24f0bdf5ffc72adb37236 + ref: f9868e2b39e539b1bb6917006b789ab7b5fec5eb required: false diff --git a/src/3rdparty/imgui/qt_attribution.json b/src/3rdparty/imgui/qt_attribution.json index c5599b70e..a42f91b37 100644 --- a/src/3rdparty/imgui/qt_attribution.json +++ b/src/3rdparty/imgui/qt_attribution.json @@ -33,7 +33,7 @@ "QDocModule": "qt3d", "Description": "Single-file public domain (or MIT licensed) libraries for C/C++", "QtUsage": "Used in tests to demonstrate and verify the integration of an external GUI library.", - "Files": "imstb_rectpack.h,imstb_textedit.h,imstb_truetype.h", + "Files": "imstb_rectpack.h imstb_textedit.h imstb_truetype.h", "Homepage": "https://github.com/nothings/stb/", "License": "MIT License or Public Domain", diff --git a/src/extras/text/qdistancefieldglyphcache.cpp b/src/extras/text/qdistancefieldglyphcache.cpp index d367410c8..72f47024c 100644 --- a/src/extras/text/qdistancefieldglyphcache.cpp +++ b/src/extras/text/qdistancefieldglyphcache.cpp @@ -162,6 +162,7 @@ DistanceFieldFont::DistanceFieldFont(const QRawFont &font, bool doubleRes, Qt3DC , m_doubleGlyphResolution(doubleRes) , m_parentNode(parent) { + Q_ASSERT(m_parentNode); } DistanceFieldFont::~DistanceFieldFont() @@ -198,13 +199,14 @@ StoredGlyph DistanceFieldFont::refGlyph(quint32 glyph) // scenarios const int size = m_doubleGlyphResolution ? 512 : 256; - QTextureAtlas *atlas = new QTextureAtlas(m_parentNode); + QTextureAtlas *atlas = new QTextureAtlas(); atlas->setWidth(size); atlas->setHeight(size); atlas->setFormat(Qt3DRender::QAbstractTexture::R8_UNorm); atlas->setPixelFormat(QOpenGLTexture::Red); atlas->setMinificationFilter(Qt3DRender::QAbstractTexture::Linear); atlas->setMagnificationFilter(Qt3DRender::QAbstractTexture::Linear); + atlas->setParent(m_parentNode); m_atlasses << atlas; if (!storedGlyph.addToTextureAtlas(atlas)) @@ -237,7 +239,12 @@ void DistanceFieldFont::derefGlyph(quint32 glyph) Q_ASSERT(m_atlasses.contains(atlas)); m_atlasses.removeAll(atlas); - delete atlas; + + // This function might have been called as a result of destroying + // the scene root which traverses the entire scene tree. Calling + // delete on the atlas here could lead to dangling pointers in the + // least of children being traversed for destruction. + atlas->deleteLater(); } m_glyphs.erase(it); @@ -288,7 +295,8 @@ DistanceFieldFont* QDistanceFieldGlyphCache::getOrCreateDistanceFieldFont(const // create new font cache // we set the parent node to nullptr, since the parent node of QTextureAtlasses // will be set when we pass them to QText2DMaterial later - DistanceFieldFont *dff = new DistanceFieldFont(actualFont, useDoubleRes, nullptr); + Q_ASSERT(m_rootNode); + DistanceFieldFont *dff = new DistanceFieldFont(actualFont, useDoubleRes, m_rootNode); m_fonts.insert(key, dff); return dff; } @@ -325,11 +333,10 @@ QDistanceFieldGlyphCache::Glyph refAndGetGlyph(DistanceFieldFont *dff, quint32 g if (dff) { const auto entry = dff->refGlyph(glyph); - if (entry.atlas()) { - ret.glyphPathBoundingRect = entry.glyphPathBoundingRect(); - ret.texCoords = entry.texCoords(); - ret.texture = entry.atlas(); - } + Q_ASSERT(entry.atlas()); + ret.glyphPathBoundingRect = entry.glyphPathBoundingRect(); + ret.texCoords = entry.texCoords(); + ret.texture = entry.atlas(); } return ret; diff --git a/src/extras/text/qtext2dentity.cpp b/src/extras/text/qtext2dentity.cpp index e4dc93f10..f25bef18e 100644 --- a/src/extras/text/qtext2dentity.cpp +++ b/src/extras/text/qtext2dentity.cpp @@ -310,8 +310,9 @@ void QText2DEntityPrivate::setCurrentGlyphRuns(const QList<QGlyphRun> &runs) delete m_renderers.takeLast(); while (m_renderers.size() < renderData.size()) { - DistanceFieldTextRenderer *renderer = new DistanceFieldTextRenderer(q_func()); + DistanceFieldTextRenderer *renderer = new DistanceFieldTextRenderer(); renderer->setColor(m_color); + renderer->setParent(q_func()); m_renderers << renderer; } diff --git a/src/render/configure.cmake b/src/render/configure.cmake index 9fb7183d9..ffa34c1f4 100644 --- a/src/render/configure.cmake +++ b/src/render/configure.cmake @@ -29,7 +29,7 @@ qt_feature("qt3d-rhi-renderer" PUBLIC ) qt_feature("qt3d-vulkan" PUBLIC LABEL "Vulkan" - CONDITION Vulkan_FOUND AND QT_FEATURE_qt3d_rhi_renderer + CONDITION Vulkan_FOUND AND QT_FEATURE_qt3d_rhi_renderer AND QT_FEATURE_vulkan ) qt_configure_add_summary_section(NAME "Qt 3D APIs") qt_configure_add_summary_entry(ARGS "qt3d-vulkan") diff --git a/src/render/materialsystem/prototypes/default.json b/src/render/materialsystem/prototypes/default.json index 16a3288ac..f92172d5d 100644 --- a/src/render/materialsystem/prototypes/default.json +++ b/src/render/materialsystem/prototypes/default.json @@ -21,6 +21,9 @@ "headerSnippets": [ "attribute highp $type $name;" ], + "headerSnippetsFrag": [ + "varying highp $type $name;" + ], "substitution": "highp $type $value = $name;" }, { diff --git a/src/render/shadergraph/qshadernodesloader.cpp b/src/render/shadergraph/qshadernodesloader.cpp index e20e4e3bc..6df9f1b69 100644 --- a/src/render/shadergraph/qshadernodesloader.cpp +++ b/src/render/shadergraph/qshadernodesloader.cpp @@ -280,7 +280,13 @@ void QShaderNodesLoader::load(const QJsonObject &prototypesObject) const QByteArray substitution = substitutionValue.toString().toUtf8(); - const QJsonValue snippetsValue = ruleObject.value(QStringLiteral("headerSnippets")); + // WA for QTBUG-99019 + const auto wIt = (format.shaderType() == QShaderFormat::Fragment) + ? ruleObject.constFind(QStringLiteral("headerSnippetsFrag")) + : ruleObject.constEnd(); + const QJsonValue snippetsValue = (wIt != ruleObject.constEnd()) + ? *wIt + : ruleObject.value(QStringLiteral("headerSnippets")); const QJsonArray snippetsArray = snippetsValue.toArray(); auto snippets = QByteArrayList(); std::transform(snippetsArray.constBegin(), snippetsArray.constEnd(), diff --git a/tests/auto/core/qaspectjob/tst_qaspectjob.cpp b/tests/auto/core/qaspectjob/tst_qaspectjob.cpp index 43c511100..5f44b0b55 100644 --- a/tests/auto/core/qaspectjob/tst_qaspectjob.cpp +++ b/tests/auto/core/qaspectjob/tst_qaspectjob.cpp @@ -79,7 +79,7 @@ private Q_SLOTS: job1->removeDependency(job2); // THEN - QCOMPARE(job1->dependencies().size(), 1); + QCOMPARE(job1->dependencies().size(), 1U); QCOMPARE(job1->dependencies().at(0).lock(), job3); } @@ -98,7 +98,7 @@ private Q_SLOTS: job1->removeDependency(QWeakPointer<QAspectJob>()); // THEN - QCOMPARE(job1->dependencies().size(), 1); + QCOMPARE(job1->dependencies().size(), 1U); QCOMPARE(job1->dependencies().at(0).lock(), job3); } }; diff --git a/tests/auto/extras/qtext2dentity/tst_qtext2dentity.cpp b/tests/auto/extras/qtext2dentity/tst_qtext2dentity.cpp index 08da931fc..5904eaac9 100644 --- a/tests/auto/extras/qtext2dentity/tst_qtext2dentity.cpp +++ b/tests/auto/extras/qtext2dentity/tst_qtext2dentity.cpp @@ -89,7 +89,7 @@ void tst_qtext2dentity::checkChangeArbiter() auto atlases = lookupNodeByClassName(rootEntity.data(), "Qt3DExtras::QTextureAtlas"); QVERIFY(atlases.length() == 1); auto atlas = atlases[0]; - QTRY_VERIFY(Qt3DCore::QNodePrivate::get(atlas)->m_changeArbiter); + QVERIFY(Qt3DCore::QNodePrivate::get(atlas)->m_changeArbiter); } QTEST_MAIN(tst_qtext2dentity) diff --git a/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp b/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp index 3a4d5f021..3cc4b3822 100644 --- a/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp +++ b/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp @@ -248,7 +248,7 @@ private Q_SLOTS: // THEN -> empty if job ran properly const std::vector<Qt3DCore::QNodeId> dirtyTechniquesId = testAspect.nodeManagers()->techniqueManager()->takeDirtyTechniques(); - QCOMPARE(dirtyTechniquesId.size(), 0); + QCOMPARE(dirtyTechniquesId.size(), 0U); // Check at least one technique is valid bool foundValid = false; diff --git a/tests/auto/render/opengl/renderviews/tst_renderviews.cpp b/tests/auto/render/opengl/renderviews/tst_renderviews.cpp index d3751e1a7..70d1305ac 100644 --- a/tests/auto/render/opengl/renderviews/tst_renderviews.cpp +++ b/tests/auto/render/opengl/renderviews/tst_renderviews.cpp @@ -309,7 +309,7 @@ private Q_SLOTS: pack.setUniformBuffer(ubo2); // THEN - QCOMPARE(pack.uniformBuffers().size(), 1); + QCOMPARE(pack.uniformBuffers().size(), 1U); QCOMPARE(pack.uniformBuffers().front().m_blockIndex, 1); QCOMPARE(pack.uniformBuffers().front().m_bufferID, nodeId2); @@ -318,7 +318,7 @@ private Q_SLOTS: pack.setUniformBuffer(ubo3); // THEN - QCOMPARE(pack.uniformBuffers().size(), 2); + QCOMPARE(pack.uniformBuffers().size(), 2U); QCOMPARE(pack.uniformBuffers().front().m_blockIndex, 1); QCOMPARE(pack.uniformBuffers().front().m_bufferID, nodeId2); QCOMPARE(pack.uniformBuffers().back().m_blockIndex, 2); @@ -340,7 +340,7 @@ private Q_SLOTS: pack.setShaderStorageBuffer(ssbo2); // THEN - QCOMPARE(pack.shaderStorageBuffers().size(), 1); + QCOMPARE(pack.shaderStorageBuffers().size(), 1U); QCOMPARE(pack.shaderStorageBuffers().front().m_blockIndex, 1); QCOMPARE(pack.shaderStorageBuffers().front().m_bufferID, nodeId2); @@ -349,7 +349,7 @@ private Q_SLOTS: pack.setShaderStorageBuffer(ssbo3); // THEN - QCOMPARE(pack.shaderStorageBuffers().size(), 2); + QCOMPARE(pack.shaderStorageBuffers().size(), 2U); QCOMPARE(pack.shaderStorageBuffers().front().m_blockIndex, 1); QCOMPARE(pack.shaderStorageBuffers().front().m_bufferID, nodeId2); QCOMPARE(pack.shaderStorageBuffers().back().m_blockIndex, 2); diff --git a/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp b/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp index df0eab407..a9e1f4fc1 100644 --- a/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp +++ b/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp @@ -2258,7 +2258,7 @@ private Q_SLOTS: std::vector<Qt3DRender::Render::PickingUtils::ViewportCameraAreaDetails> results = gatherer.gather(test->frameGraphRoot()); // THEN - QCOMPARE(results.size(), 0); + QCOMPARE(results.size(), 0U); // WHEN Qt3DRender::Render::FrameGraphNode *backendFGNode = test->nodeManagers()->frameGraphManager()->lookupNode(noPicking->id()); @@ -2274,7 +2274,7 @@ private Q_SLOTS: results = gatherer.gather(test->frameGraphRoot()); // THEN - QCOMPARE(results.size(), 1); + QCOMPARE(results.size(), 1U); auto vca = results.front(); QCOMPARE(vca.area, QSize(600, 600)); QCOMPARE(vca.cameraId, camera->id()); |