diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-04-12 13:41:35 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-04-13 09:22:24 +0000 |
commit | 8c68adb073cb48dfd873ce66793bd5e990af68d0 (patch) | |
tree | cebfe7ce6263e8f2e39c6c59bfb2d42ee1e28453 /src | |
parent | b943809c41cda9c01f26ba02ece4b6690b528d48 (diff) |
Convert d3d12 backend into a plugin
Change-Id: I4300ba81800e44c0b5e2a86e72b1cf96434c323d
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/plugins.pro | 1 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/d3d12.json | 3 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/d3d12.pro (renamed from src/quick/scenegraph/adaptations/d3d12/d3d12.pri) | 15 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12adaptation.cpp (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12adaptation.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12adaptation_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12adaptation_p.h) | 3 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials.cpp (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12builtinmaterials.cpp) | 2 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12builtinmaterials_p.h) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12context.cpp (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12context.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12context_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12context_p.h) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12engine.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12engine_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12engine_p.h) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12engine_p_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12engine_p_p.h) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12glyphcache.cpp (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12glyphcache.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12glyphcache_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12glyphcache_p.h) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12glyphnode.cpp (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12glyphnode.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12glyphnode_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12glyphnode_p.h) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12imagenode.cpp (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12imagenode.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12imagenode_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12imagenode_p.h) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12layer.cpp (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12layer.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12layer_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12layer_p.h) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12material.cpp (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12material.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12material_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12material_p.h) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12rectanglenode.cpp (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12rectanglenode.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12rectanglenode_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12rectanglenode_p.h) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12rendercontext.cpp (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12rendercontext.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12rendercontext_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12rendercontext_p.h) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12renderer.cpp (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12renderer.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12renderer_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12renderer_p.h) | 1 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12renderloop.cpp) | 18 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12renderloop_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12renderloop_p.h) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12texture.cpp (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12texture.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12texture_p.h (renamed from src/quick/scenegraph/adaptations/d3d12/qsgd3d12texture_p.h) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/shaders/mipmapgen.hlsl (renamed from src/quick/scenegraph/adaptations/d3d12/shaders/mipmapgen.hlsl) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/shaders/shaders.pri (renamed from src/quick/scenegraph/adaptations/d3d12/shaders/shaders.pri) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/shaders/smoothcolor.hlsl (renamed from src/quick/scenegraph/adaptations/d3d12/shaders/smoothcolor.hlsl) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/shaders/smoothtexture.hlsl (renamed from src/quick/scenegraph/adaptations/d3d12/shaders/smoothtexture.hlsl) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/shaders/stencilclip.hlsl (renamed from src/quick/scenegraph/adaptations/d3d12/shaders/stencilclip.hlsl) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/shaders/textmask.hlsl (renamed from src/quick/scenegraph/adaptations/d3d12/shaders/textmask.hlsl) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/shaders/texture.hlsl (renamed from src/quick/scenegraph/adaptations/d3d12/shaders/texture.hlsl) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/shaders/vertexcolor.hlsl (renamed from src/quick/scenegraph/adaptations/d3d12/shaders/vertexcolor.hlsl) | 0 | ||||
-rw-r--r-- | src/plugins/scenegraph/scenegraph.pro | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/adaptations/adaptations.pri | 1 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgbasicglyphnode_p.h | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgcontextplugin.cpp | 6 |
44 files changed, 35 insertions, 19 deletions
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 70a1eb22b6..11c8641e21 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -1,3 +1,4 @@ TEMPLATE = subdirs !contains(QT_CONFIG, no-qml-debug):SUBDIRS += qmltooling +SUBDIRS += scenegraph diff --git a/src/plugins/scenegraph/d3d12/d3d12.json b/src/plugins/scenegraph/d3d12/d3d12.json new file mode 100644 index 0000000000..c450a38556 --- /dev/null +++ b/src/plugins/scenegraph/d3d12/d3d12.json @@ -0,0 +1,3 @@ +{ + "Keys": ["d3d12"] +} diff --git a/src/quick/scenegraph/adaptations/d3d12/d3d12.pri b/src/plugins/scenegraph/d3d12/d3d12.pro index 1a24f84756..32bd6810e3 100644 --- a/src/quick/scenegraph/adaptations/d3d12/d3d12.pri +++ b/src/plugins/scenegraph/d3d12/d3d12.pro @@ -1,3 +1,14 @@ +TARGET = qsgd3d12backend + +QT += core-private gui-private qml-private quick-private + +PLUGIN_TYPE = scenegraph +PLUGIN_CLASS_NAME = QSGD3D12Adaptation +load(qt_plugin) + +QMAKE_TARGET_PRODUCT = "Qt Quick D3D12 Renderer (Qt $$QT_VERSION)" +QMAKE_TARGET_DESCRIPTION = "Quick D3D12 Renderer for Qt." + SOURCES += \ $$PWD/qsgd3d12adaptation.cpp \ $$PWD/qsgd3d12renderloop.cpp \ @@ -35,6 +46,6 @@ HEADERS += \ LIBS += -ldxgi -ld3d12 -DEFINES += QSG_D3D12 - include($$PWD/shaders/shaders.pri) + +OTHER_FILES += $$PWD/d3d12.json diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12adaptation.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12adaptation.cpp index ba1a88d34a..ba1a88d34a 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12adaptation.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12adaptation.cpp diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12adaptation_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12adaptation_p.h index dbb408975d..035c3408ff 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12adaptation_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12adaptation_p.h @@ -61,6 +61,9 @@ class QSGRenderLoop; class QSGD3D12Adaptation : public QSGContextPlugin { + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSGContextFactoryInterface" FILE "d3d12.json") + public: QSGD3D12Adaptation(QObject *parent = 0); diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12builtinmaterials.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials.cpp index ab0c98a8cd..09d70fd168 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12builtinmaterials.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials.cpp @@ -40,6 +40,8 @@ #include "qsgd3d12builtinmaterials_p.h" #include "qsgd3d12rendercontext_p.h" #include <QQuickWindow> +#include <QtCore/qmath.h> +#include <QtGui/private/qfixed_p.h> #include "vs_vertexcolor.hlslh" #include "ps_vertexcolor.hlslh" diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12builtinmaterials_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials_p.h index 8a475ddb77..8a475ddb77 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12builtinmaterials_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials_p.h diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12context.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12context.cpp index 0bb342226b..0bb342226b 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12context.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12context.cpp diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12context_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12context_p.h index 2afe22e3af..2afe22e3af 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12context_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12context_p.h diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12engine.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp index afeeea760c..afeeea760c 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12engine.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12engine_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12engine_p.h index 84bb5a554e..84bb5a554e 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12engine_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12engine_p.h diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12engine_p_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12engine_p_p.h index 40d1fdb510..40d1fdb510 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12engine_p_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12engine_p_p.h diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12glyphcache.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12glyphcache.cpp index 373e16d7c4..373e16d7c4 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12glyphcache.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12glyphcache.cpp diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12glyphcache_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12glyphcache_p.h index a7430580a8..a7430580a8 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12glyphcache_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12glyphcache_p.h diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12glyphnode.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12glyphnode.cpp index e559739018..e559739018 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12glyphnode.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12glyphnode.cpp diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12glyphnode_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12glyphnode_p.h index d04a8e8777..d04a8e8777 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12glyphnode_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12glyphnode_p.h diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12imagenode.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12imagenode.cpp index 9bb360bc5e..9bb360bc5e 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12imagenode.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12imagenode.cpp diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12imagenode_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12imagenode_p.h index ef4b38884a..ef4b38884a 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12imagenode_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12imagenode_p.h diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12layer.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12layer.cpp index 6623c51f5c..6623c51f5c 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12layer.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12layer.cpp diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12layer_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12layer_p.h index d167cf4f66..d167cf4f66 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12layer_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12layer_p.h diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12material.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12material.cpp index 3412a4b63b..3412a4b63b 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12material.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12material.cpp diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12material_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12material_p.h index e9af8e68a0..e9af8e68a0 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12material_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12material_p.h diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12rectanglenode.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12rectanglenode.cpp index 7548f5cbc0..7548f5cbc0 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12rectanglenode.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12rectanglenode.cpp diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12rectanglenode_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12rectanglenode_p.h index 95f734bc4c..95f734bc4c 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12rectanglenode_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12rectanglenode_p.h diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12rendercontext.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12rendercontext.cpp index af3e8e36ee..af3e8e36ee 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12rendercontext.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12rendercontext.cpp diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12rendercontext_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12rendercontext_p.h index 1acb7e4205..1acb7e4205 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12rendercontext_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12rendercontext_p.h diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12renderer.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12renderer.cpp index 7f8b10f003..7f8b10f003 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12renderer.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12renderer.cpp diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12renderer_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12renderer_p.h index adb2252f80..0877c3699a 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12renderer_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12renderer_p.h @@ -53,6 +53,7 @@ #include <private/qsgrenderer_p.h> #include <QtGui/private/qdatabuffer_p.h> +#include <QtCore/qbitarray.h> #include "qsgd3d12engine_p.h" #include "qsgd3d12material_p.h" diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12renderloop.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp index 121d010bbb..94bdf38819 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12renderloop.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp @@ -49,6 +49,8 @@ #include <private/qqmldebugserviceinterfaces_p.h> #include <private/qqmldebugconnector_p.h> #include <QElapsedTimer> +#include <QQueue> +#include <QGuiApplication> QT_BEGIN_NAMESPACE @@ -517,8 +519,7 @@ void QSGD3D12RenderThread::sync(bool inExpose) void QSGD3D12RenderThread::syncAndRender() { - bool profileFrames = QSG_LOG_TIME_RENDERLOOP().isDebugEnabled(); - if (profileFrames) { + if (Q_UNLIKELY(debug_time())) { sinceLastTime = threadTimer.nsecsElapsed(); threadTimer.start(); } @@ -542,7 +543,7 @@ void QSGD3D12RenderThread::syncAndRender() sync(exposeRequested); #ifndef QSG_NO_RENDER_TIMING - if (profileFrames) + if (Q_UNLIKELY(debug_time())) syncTime = threadTimer.nsecsElapsed(); #endif Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphRenderLoopFrame); @@ -578,7 +579,7 @@ void QSGD3D12RenderThread::syncAndRender() if (canRender) { wd->renderSceneGraph(engine->windowSize()); - if (profileFrames) + if (Q_UNLIKELY(debug_time())) renderTime = threadTimer.nsecsElapsed(); Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphRenderLoopFrame); @@ -1035,15 +1036,14 @@ void QSGD3D12RenderLoop::polishAndSync(WindowData *w, bool inExpose) qint64 polishTime = 0; qint64 waitTime = 0; qint64 syncTime = 0; - bool profileFrames = QSG_LOG_TIME_RENDERLOOP().isDebugEnabled(); - if (profileFrames) + if (Q_UNLIKELY(debug_time())) timer.start(); Q_QUICK_SG_PROFILE_START(QQuickProfiler::SceneGraphPolishAndSync); QQuickWindowPrivate *wd = QQuickWindowPrivate::get(window); wd->polishItems(); - if (profileFrames) + if (Q_UNLIKELY(debug_time())) polishTime = timer.nsecsElapsed(); Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphPolishAndSync); @@ -1060,7 +1060,7 @@ void QSGD3D12RenderLoop::polishAndSync(WindowData *w, bool inExpose) if (Q_UNLIKELY(debug_loop())) qDebug("polishAndSync - wait for sync"); - if (profileFrames) + if (Q_UNLIKELY(debug_time())) waitTime = timer.nsecsElapsed(); Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphPolishAndSync); w->thread->waitCondition.wait(&w->thread->mutex); @@ -1069,7 +1069,7 @@ void QSGD3D12RenderLoop::polishAndSync(WindowData *w, bool inExpose) if (Q_UNLIKELY(debug_loop())) qDebug("polishAndSync - unlock after sync"); - if (profileFrames) + if (Q_UNLIKELY(debug_time())) syncTime = timer.nsecsElapsed(); Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphPolishAndSync); diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12renderloop_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12renderloop_p.h index 56dcb1d490..56dcb1d490 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12renderloop_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12renderloop_p.h diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12texture.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12texture.cpp index 0250023fdf..0250023fdf 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12texture.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12texture.cpp diff --git a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12texture_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12texture_p.h index b9d53dd1e6..b9d53dd1e6 100644 --- a/src/quick/scenegraph/adaptations/d3d12/qsgd3d12texture_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12texture_p.h diff --git a/src/quick/scenegraph/adaptations/d3d12/shaders/mipmapgen.hlsl b/src/plugins/scenegraph/d3d12/shaders/mipmapgen.hlsl index 6793b534b0..6793b534b0 100644 --- a/src/quick/scenegraph/adaptations/d3d12/shaders/mipmapgen.hlsl +++ b/src/plugins/scenegraph/d3d12/shaders/mipmapgen.hlsl diff --git a/src/quick/scenegraph/adaptations/d3d12/shaders/shaders.pri b/src/plugins/scenegraph/d3d12/shaders/shaders.pri index 02786e2606..02786e2606 100644 --- a/src/quick/scenegraph/adaptations/d3d12/shaders/shaders.pri +++ b/src/plugins/scenegraph/d3d12/shaders/shaders.pri diff --git a/src/quick/scenegraph/adaptations/d3d12/shaders/smoothcolor.hlsl b/src/plugins/scenegraph/d3d12/shaders/smoothcolor.hlsl index 4f69eea60f..4f69eea60f 100644 --- a/src/quick/scenegraph/adaptations/d3d12/shaders/smoothcolor.hlsl +++ b/src/plugins/scenegraph/d3d12/shaders/smoothcolor.hlsl diff --git a/src/quick/scenegraph/adaptations/d3d12/shaders/smoothtexture.hlsl b/src/plugins/scenegraph/d3d12/shaders/smoothtexture.hlsl index 05b1c6e9d4..05b1c6e9d4 100644 --- a/src/quick/scenegraph/adaptations/d3d12/shaders/smoothtexture.hlsl +++ b/src/plugins/scenegraph/d3d12/shaders/smoothtexture.hlsl diff --git a/src/quick/scenegraph/adaptations/d3d12/shaders/stencilclip.hlsl b/src/plugins/scenegraph/d3d12/shaders/stencilclip.hlsl index 9aff84d261..9aff84d261 100644 --- a/src/quick/scenegraph/adaptations/d3d12/shaders/stencilclip.hlsl +++ b/src/plugins/scenegraph/d3d12/shaders/stencilclip.hlsl diff --git a/src/quick/scenegraph/adaptations/d3d12/shaders/textmask.hlsl b/src/plugins/scenegraph/d3d12/shaders/textmask.hlsl index f9d92e8ee9..f9d92e8ee9 100644 --- a/src/quick/scenegraph/adaptations/d3d12/shaders/textmask.hlsl +++ b/src/plugins/scenegraph/d3d12/shaders/textmask.hlsl diff --git a/src/quick/scenegraph/adaptations/d3d12/shaders/texture.hlsl b/src/plugins/scenegraph/d3d12/shaders/texture.hlsl index 1ae6579e8d..1ae6579e8d 100644 --- a/src/quick/scenegraph/adaptations/d3d12/shaders/texture.hlsl +++ b/src/plugins/scenegraph/d3d12/shaders/texture.hlsl diff --git a/src/quick/scenegraph/adaptations/d3d12/shaders/vertexcolor.hlsl b/src/plugins/scenegraph/d3d12/shaders/vertexcolor.hlsl index a0569bb5c1..a0569bb5c1 100644 --- a/src/quick/scenegraph/adaptations/d3d12/shaders/vertexcolor.hlsl +++ b/src/plugins/scenegraph/d3d12/shaders/vertexcolor.hlsl diff --git a/src/plugins/scenegraph/scenegraph.pro b/src/plugins/scenegraph/scenegraph.pro new file mode 100644 index 0000000000..2cf05165c4 --- /dev/null +++ b/src/plugins/scenegraph/scenegraph.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +config_d3d12: SUBDIRS += d3d12 diff --git a/src/quick/scenegraph/adaptations/adaptations.pri b/src/quick/scenegraph/adaptations/adaptations.pri index a3738d6b82..40fa739e15 100644 --- a/src/quick/scenegraph/adaptations/adaptations.pri +++ b/src/quick/scenegraph/adaptations/adaptations.pri @@ -1,2 +1 @@ include(software/software.pri) -config_d3d12: include(d3d12/d3d12.pri) diff --git a/src/quick/scenegraph/qsgbasicglyphnode_p.h b/src/quick/scenegraph/qsgbasicglyphnode_p.h index 6c6e1d7cc6..1d09367ea5 100644 --- a/src/quick/scenegraph/qsgbasicglyphnode_p.h +++ b/src/quick/scenegraph/qsgbasicglyphnode_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE class QSGMaterial; -class QSGBasicGlyphNode: public QSGGlyphNode +class Q_QUICK_PRIVATE_EXPORT QSGBasicGlyphNode: public QSGGlyphNode { public: QSGBasicGlyphNode(); diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp index 646798efe2..5a5a16e005 100644 --- a/src/quick/scenegraph/qsgcontextplugin.cpp +++ b/src/quick/scenegraph/qsgcontextplugin.cpp @@ -45,9 +45,6 @@ // Built-in adaptations #include <QtQuick/private/qsgsoftwareadaptation_p.h> -#ifdef QSG_D3D12 -#include <QtQuick/private/qsgd3d12adaptation_p.h> -#endif #ifndef QT_NO_OPENGL #include <QtQuick/private/qsgdefaultcontext_p.h> #endif @@ -89,9 +86,6 @@ QSGAdaptionBackendData::QSGAdaptionBackendData() { // Fill in the table with the built-in adaptations. builtIns.append(new QSGSoftwareAdaptation); -#ifdef QSG_D3D12 - builtIns.append(new QSGD3D12Adaptation); -#endif } Q_GLOBAL_STATIC(QSGAdaptionBackendData, qsg_adaptation_data) |