diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-08 01:00:31 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-08 01:00:31 +0200 |
commit | 38e97c68ba25c29a6fbdd3f79d56fd52a0f58a4c (patch) | |
tree | 10bba7efed661c45e62c89c07f8b0f01d9bf6701 /src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | |
parent | 67fc5b677a05f88f043ea825810b7b244a516b42 (diff) | |
parent | e5f3e7149b7e130c375c1419f1f804dfeaf578aa (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ib381f350ada365747ce20b989bfdc368d75f2219
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index 29923b5d20..34027cbac7 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -187,7 +187,7 @@ static QRhiVertexInputLayout calculateVertexInputLayout(const QSGMaterialRhiShad } const int attrCount = geometry->attributeCount(); - QVector<QRhiVertexInputAttribute> inputAttributes; + QVarLengthArray<QRhiVertexInputAttribute, 8> inputAttributes; inputAttributes.reserve(attrCount + 1); int offset = 0; for (int i = 0; i < attrCount; ++i) { @@ -205,15 +205,14 @@ static QRhiVertexInputLayout calculateVertexInputLayout(const QSGMaterialRhiShad } Q_ASSERT(VERTEX_BUFFER_BINDING == 0 && ZORDER_BUFFER_BINDING == 1); // not very flexible - QVector<QRhiVertexInputBinding> inputBindings; - inputBindings.reserve(2); + QVarLengthArray<QRhiVertexInputBinding, 2> inputBindings; inputBindings.append(QRhiVertexInputBinding(geometry->sizeOfVertex())); if (batchable) inputBindings.append(QRhiVertexInputBinding(sizeof(float))); QRhiVertexInputLayout inputLayout; - inputLayout.setBindings(inputBindings); - inputLayout.setAttributes(inputAttributes); + inputLayout.setBindings(inputBindings.cbegin(), inputBindings.cend()); + inputLayout.setAttributes(inputAttributes.cbegin(), inputAttributes.cend()); return inputLayout; } @@ -2849,10 +2848,8 @@ void Renderer::updateClipState(const QSGClipNode *clipList, Batch *batch) // RHI else { if (qsg_topology(g->drawingMode()) != m_stencilClipCommon.topology) qWarning("updateClipState: Clip list entries have different primitive topologies, this is not currently supported."); -#if 0 // ### restore once the 5.14 submodule update is done - if (qsg_vertexInputFormat(*a) != m_stencilClipCommon.inputLayout.attributes().first().format()) + if (qsg_vertexInputFormat(*a) != m_stencilClipCommon.inputLayout.cbeginAttributes()->format()) qWarning("updateClipState: Clip list entries have different vertex input layouts, this is must not happen."); -#endif } #endif |