diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-04-26 12:47:59 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-04-29 09:36:36 +0000 |
commit | 96cdc5be2aa0cf87033591cfd76661291b3f6933 (patch) | |
tree | feac67a35952fcaf9b64db0a4b227957852b66d0 /src/quick/scenegraph/qsgadaptationlayer_p.h | |
parent | e88e2940598086b57e6c844afa2eca4153d0f528 (diff) |
D3D12: Long Live Wobble!
D3D12 shader effect node.
Cull mode, atlas (qt_SubRect_*) support, and some nice-to-haves are
currently missing. The built-in shaders won't yet work due to not sending
'source' down the stack so both have to be application-supplied.
Nonetheless..the wobble test works!
Change-Id: If4cd0143fa5794a8d5f89b576ffcfb084efeb343
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgadaptationlayer_p.h')
-rw-r--r-- | src/quick/scenegraph/qsgadaptationlayer_p.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/quick/scenegraph/qsgadaptationlayer_p.h b/src/quick/scenegraph/qsgadaptationlayer_p.h index 5155cdd719..c06e681d30 100644 --- a/src/quick/scenegraph/qsgadaptationlayer_p.h +++ b/src/quick/scenegraph/qsgadaptationlayer_p.h @@ -289,6 +289,7 @@ public: Type type; QVector<InputParameter> inputParameters; QVector<Variable> variables; + uint constantDataSize; }; virtual bool reflect(const QByteArray &src, ShaderInfo *result) = 0; @@ -307,12 +308,13 @@ class Q_QUICK_PRIVATE_EXPORT QSGShaderEffectNode : public QSGVisitableNode { public: enum DirtyShaderFlag { - DirtyShaderVertex = 0x01, - DirtyShaderFragment = 0x02, - DirtyShaderConstant = 0x04, - DirtyShaderTexture = 0x08, - DirtyShaderGeometry = 0x10, - DirtyShaderMesh = 0x20 + DirtyShaders = 0x01, + DirtyShaderConstant = 0x02, + DirtyShaderTexture = 0x04, + DirtyShaderGeometry = 0x08, + DirtyShaderMesh = 0x10, + + DirtyShaderAll = 0xFF }; Q_DECLARE_FLAGS(DirtyShaderFlags, DirtyShaderFlag) @@ -323,7 +325,7 @@ public: }; struct VariableData { - enum SpecialType { None, Unused, SubRect, Opacity, Matrix, Source }; + enum SpecialType { None, Unused, Source, SubRect, Opacity, Matrix }; QVariant value; SpecialType specialType; @@ -341,8 +343,13 @@ public: CullMode cullMode; bool blending; bool supportsAtlasTextures; - ShaderData *vertexShader; - ShaderData *fragmentShader; + struct ShaderSyncData { + const ShaderData *shader; + const QSet<int> *dirtyConstants; + const QSet<int> *dirtyTextures; + }; + ShaderSyncData vertex; + ShaderSyncData fragment; }; // Each ShaderEffect item has one node (render thread) and one manager (gui thread). @@ -356,6 +363,10 @@ public: Q_DECLARE_OPERATORS_FOR_FLAGS(QSGShaderEffectNode::DirtyShaderFlags) +#ifndef QT_NO_DEBUG_STREAM +Q_QUICK_PRIVATE_EXPORT QDebug operator<<(QDebug debug, const QSGShaderEffectNode::VariableData &vd); +#endif + class Q_QUICK_PRIVATE_EXPORT QSGGlyphNode : public QSGVisitableNode { public: |