[neon/qt6/qt6-quick3d/Neon/release] debian/patches: backport unity build compile fix from 6.7

Carlos De Maine null at kde.org
Fri Mar 29 08:41:17 GMT 2024


Git commit c24e4758a38d6603cfabe59aa3aed32fd95f93b4 by Carlos De Maine.
Committed on 29/03/2024 at 08:41.
Pushed by carlosdem into branch 'Neon/release'.

backport unity build compile fix from 6.7

A  +105  -0    debian/patches/backport_inity_build_fix_qtquick3d-536528
A  +1    -0    debian/patches/series

https://invent.kde.org/neon/qt6/qt6-quick3d/-/commit/c24e4758a38d6603cfabe59aa3aed32fd95f93b4

diff --git a/debian/patches/backport_inity_build_fix_qtquick3d-536528 b/debian/patches/backport_inity_build_fix_qtquick3d-536528
new file mode 100644
index 0000000..2174522
--- /dev/null
+++ b/debian/patches/backport_inity_build_fix_qtquick3d-536528
@@ -0,0 +1,105 @@
+From: Tim Blechmann <tim at klingt.org>
+Date: Thu, 1 Feb 2024 12:29:31 +0000 (+0800)
+Subject: fix unity builds
+X-Git-Url: https://codereview.qt-project.org/gitweb?p=qt%2Fqtquick3d.git;a=commitdiff_plain;h=918e778e2a3c96d2591e666e1f94473fc857fe01;hp=68e3a3a3a90e6bc4c3993081c0a4d74b5c75d51c
+
+fix unity builds
+
+* `Q_DECLARE_OPAQUE_POINTER` in header to avoid 'specialisation after
+instantiation'
+* prevent name clash of `ensureNormalized`
+
+Pick-to: 6.7
+Change-Id: I3fcbff6a16b29e2105d094c33944021a1a1afe24
+Reviewed-by: Christian Strømme <christian.stromme at qt.io>
+---
+
+diff --git a/src/quick3d/CMakeLists.txt b/src/quick3d/CMakeLists.txt
+index 085e24669..6345c442e 100644
+--- a/src/quick3d/CMakeLists.txt
++++ b/src/quick3d/CMakeLists.txt
+@@ -63,8 +63,6 @@ qt_internal_add_module(Quick3D
+         qquick3dlightmapbaker.cpp qquick3dlightmapbaker_p.h
+         extensions/qquick3drenderextensions.cpp extensions/qquick3drenderextensions.h
+         extensions/qquick3dextensionhelpers.cpp extensions/qquick3dextensionhelpers.h
+-    NO_UNITY_BUILD_SOURCES
+-        qquick3dspecularglossymaterial.cpp # redefinition of 'ensureNormalized' (from qquick3dprincipledmaterial.cpp)
+     SSG_HEADER_FILTERS
+         "(^|/)qquick3dextensionhelpers\\.h$"
+     DEFINES
+diff --git a/src/quick3d/qquick3dcustommaterial.cpp b/src/quick3d/qquick3dcustommaterial.cpp
+index 7e7f6d69f..2964cc5d2 100644
+--- a/src/quick3d/qquick3dcustommaterial.cpp
++++ b/src/quick3d/qquick3dcustommaterial.cpp
+@@ -11,8 +11,6 @@
+ #include "qquick3dviewport_p.h"
+ #include "qquick3dscenemanager_p.h"
+ 
+-Q_DECLARE_OPAQUE_POINTER(QQuick3DShaderUtilsTextureInput)
+-
+ QT_BEGIN_NAMESPACE
+ 
+ /*!
+diff --git a/src/quick3d/qquick3dprincipledmaterial.cpp b/src/quick3d/qquick3dprincipledmaterial.cpp
+index 30cf7fda2..823cb9228 100644
+--- a/src/quick3d/qquick3dprincipledmaterial.cpp
++++ b/src/quick3d/qquick3dprincipledmaterial.cpp
+@@ -712,8 +712,6 @@ QT_BEGIN_NAMESPACE
+     material. The default value is true.
+ */
+ 
+-inline static float ensureNormalized(float val) { return qBound(0.0f, val, 1.0f); }
+-
+ QQuick3DPrincipledMaterial::QQuick3DPrincipledMaterial(QQuick3DObject *parent)
+     : QQuick3DMaterial(*(new QQuick3DObjectPrivate(QQuick3DObjectPrivate::Type::PrincipledMaterial)), parent)
+ {}
+diff --git a/src/quick3d/qquick3dprincipledmaterial_p.h b/src/quick3d/qquick3dprincipledmaterial_p.h
+index 93c2760d3..b01e58a9b 100644
+--- a/src/quick3d/qquick3dprincipledmaterial_p.h
++++ b/src/quick3d/qquick3dprincipledmaterial_p.h
+@@ -385,6 +385,8 @@ private:
+ 
+     quint32 m_dirtyAttributes = 0xffffffff; // all dirty by default
+     void markDirty(DirtyType type);
++
++    static constexpr float ensureNormalized(float val) { return qBound(0.0f, val, 1.0f); }
+ };
+ 
+ QT_END_NAMESPACE
+diff --git a/src/quick3d/qquick3dshaderutils_p.h b/src/quick3d/qquick3dshaderutils_p.h
+index 8f9c92c86..abec6dfa9 100644
+--- a/src/quick3d/qquick3dshaderutils_p.h
++++ b/src/quick3d/qquick3dshaderutils_p.h
+@@ -278,4 +278,6 @@ Q_SIGNALS:
+ 
+ QT_END_NAMESPACE
+ 
++Q_DECLARE_OPAQUE_POINTER(QQuick3DShaderUtilsTextureInput)
++
+ #endif // QQUICK3DSHADERUTILS_H
+diff --git a/src/quick3d/qquick3dspecularglossymaterial.cpp b/src/quick3d/qquick3dspecularglossymaterial.cpp
+index b164c5812..bdd67ce00 100644
+--- a/src/quick3d/qquick3dspecularglossymaterial.cpp
++++ b/src/quick3d/qquick3dspecularglossymaterial.cpp
+@@ -581,8 +581,6 @@ QT_BEGIN_NAMESPACE
+     material. The default value is true.
+ */
+ 
+-inline static float ensureNormalized(float val) { return qBound(0.0f, val, 1.0f); }
+-
+ QQuick3DSpecularGlossyMaterial::QQuick3DSpecularGlossyMaterial(QQuick3DObject *parent)
+     : QQuick3DMaterial(*(new QQuick3DObjectPrivate(QQuick3DObjectPrivate::Type::SpecularGlossyMaterial)), parent)
+ {}
+diff --git a/src/quick3d/qquick3dspecularglossymaterial_p.h b/src/quick3d/qquick3dspecularglossymaterial_p.h
+index af3c9b25f..16e0d4957 100644
+--- a/src/quick3d/qquick3dspecularglossymaterial_p.h
++++ b/src/quick3d/qquick3dspecularglossymaterial_p.h
+@@ -343,6 +343,8 @@ private:
+ 
+     quint32 m_dirtyAttributes = 0xffffffff; // all dirty by default
+     void markDirty(DirtyType type);
++
++    static constexpr float ensureNormalized(float val) { return qBound(0.0f, val, 1.0f); }
+ };
+ 
+ QT_END_NAMESPACE
\ No newline at end of file
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7b4502c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+backport_inity_build_fix_qtquick3d-536528
\ No newline at end of file


More information about the Neon-commits mailing list