diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-18 08:33:26 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-18 08:33:26 +0200 |
commit | f04c2c40fd7ee91e5cbff2ca4df0fdc30dfbbcd5 (patch) | |
tree | 4e96d097987deb8d4d1a963e911dcbd1641a8502 /src/plugins/scenegraph/d3d12/qsgd3d12renderer.cpp | |
parent | 0da811cdfebdae1d96c99fe681e6a776e73d2f7f (diff) | |
parent | e76ed6a2655894bd671ee7397a15f2e57cfc8d33 (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
src/qml/jsruntime/qv4variantobject.cpp
src/qml/types/qquickworkerscript.cpp
src/quick/scenegraph/util/qsgdefaultpainternode_p.h
tools/qmljs/qmljs.cpp
Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
Diffstat (limited to 'src/plugins/scenegraph/d3d12/qsgd3d12renderer.cpp')
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12renderer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12renderer.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12renderer.cpp index ce633ae996..c0f111ee83 100644 --- a/src/plugins/scenegraph/d3d12/qsgd3d12renderer.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12renderer.cpp @@ -561,10 +561,11 @@ void QSGD3D12Renderer::setInputLayout(const QSGGeometry *g, QSGD3D12PipelineStat QSGD3D12InputElement &ie(pipelineState->inputElements[i]); static const char *semanticNames[] = { "UNKNOWN", "POSITION", "COLOR", "TEXCOORD", "TEXCOORD", "TEXCOORD" }; static const int semanticIndices[] = { 0, 0, 0, 0, 1, 2 }; - Q_ASSERT(attrs[i].semantic >= 1 && attrs[i].semantic < _countof(semanticNames)); + const int semantic = attrs[i].attributeType; + Q_ASSERT(semantic >= 1 && semantic < _countof(semanticNames)); const int tupleSize = attrs[i].tupleSize; - ie.semanticName = semanticNames[attrs[i].semantic]; - ie.semanticIndex = semanticIndices[attrs[i].semantic]; + ie.semanticName = semanticNames[semantic]; + ie.semanticIndex = semanticIndices[semantic]; ie.offset = offset; int bytesPerTuple = 0; ie.format = QSGD3D12Engine::toDXGIFormat(QSGGeometry::Type(attrs[i].type), tupleSize, &bytesPerTuple); @@ -718,7 +719,7 @@ void QSGD3D12Renderer::renderStencilClip(const QSGClipNode *clip, int elementInd const QSGGeometry *g = clip->geometry(); Q_ASSERT(g->attributeCount() == 1); Q_ASSERT(g->attributes()[0].tupleSize == 2); - Q_ASSERT(g->attributes()[0].type == QSGGeometry::TypeFloat); + Q_ASSERT(g->attributes()[0].type == QSGGeometry::FloatType); setInputLayout(g, &sps); m_engine->finalizePipeline(sps); |