diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-17 12:48:20 +1000 |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-17 12:48:20 +1000 |
commit | 8da9d3fe15ff1f587fbe2a180036317335c705a7 (patch) | |
tree | 53ad104fc1c6b9cc44ed67fb7db6a9b76b744436 | |
parent | 69a17a912a41458a2b4a20bdbda1717920275250 (diff) | |
parent | 658ca667ad9a3dca6313886f8d49d254b5161c1b (diff) |
Merge branch 'qtquick2' into v8
-rw-r--r-- | src/declarative/items/qsgshadereffectitem.cpp | 1 | ||||
-rw-r--r-- | src/declarative/items/qsgshadereffectmesh.cpp | 1 | ||||
-rw-r--r-- | src/declarative/items/qsgshadereffectnode.cpp | 1 | ||||
-rw-r--r-- | src/declarative/scenegraph/coreapi/qsgrenderer.cpp | 15 | ||||
-rw-r--r-- | tests/benchmarks/declarative/binding/tst_binding.cpp | 3 |
5 files changed, 19 insertions, 2 deletions
diff --git a/src/declarative/items/qsgshadereffectitem.cpp b/src/declarative/items/qsgshadereffectitem.cpp index 44e075c6f7..3fae0f15fd 100644 --- a/src/declarative/items/qsgshadereffectitem.cpp +++ b/src/declarative/items/qsgshadereffectitem.cpp @@ -540,6 +540,7 @@ QSGNode *QSGShaderEffectItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeD s.fragmentCode = qt_default_fragment_code; if (s.vertexCode.isEmpty()) s.vertexCode = qt_default_vertex_code; + s.className = metaObject()->className(); m_material.setProgramSource(s); node->markDirty(QSGNode::DirtyMaterial); diff --git a/src/declarative/items/qsgshadereffectmesh.cpp b/src/declarative/items/qsgshadereffectmesh.cpp index 4900755e46..dbc3472d09 100644 --- a/src/declarative/items/qsgshadereffectmesh.cpp +++ b/src/declarative/items/qsgshadereffectmesh.cpp @@ -203,7 +203,6 @@ void QSGGridMesh::setResolution(const QSize &res) if (res == m_resolution) return; if (res.width() < 1 || res.height() < 1) { - qWarning("QSGGridMesh: Resolution must be at least 1x1"); return; } m_resolution = res; diff --git a/src/declarative/items/qsgshadereffectnode.cpp b/src/declarative/items/qsgshadereffectnode.cpp index 74cd995d0d..5d3efb934c 100644 --- a/src/declarative/items/qsgshadereffectnode.cpp +++ b/src/declarative/items/qsgshadereffectnode.cpp @@ -84,6 +84,7 @@ QSGCustomMaterialShader::QSGCustomMaterialShader(const QSGShaderEffectMaterialKe void QSGCustomMaterialShader::deactivate() { + QSGMaterialShader::deactivate(); glDisable(GL_CULL_FACE); } diff --git a/src/declarative/scenegraph/coreapi/qsgrenderer.cpp b/src/declarative/scenegraph/coreapi/qsgrenderer.cpp index dbf704b64a..cc24cc066b 100644 --- a/src/declarative/scenegraph/coreapi/qsgrenderer.cpp +++ b/src/declarative/scenegraph/coreapi/qsgrenderer.cpp @@ -229,6 +229,21 @@ void QSGRenderer::renderScene(const Bindable &bindable) int bindTime = frameTimer.elapsed(); #endif +#ifndef QT_NO_DEBUG + // Sanity check that attribute registers are disabled + { + GLint count; + glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &count); + GLint enabled; + for (int i=0; i<count; ++i) { + glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &enabled); + if (enabled) { + qWarning("QSGRenderer: attribute %d is enabled, this can lead to memory corruption and crashes.", i); + } + } + } +#endif + render(); #ifdef QSG_RENDERER_TIMING int renderTime = frameTimer.elapsed(); diff --git a/tests/benchmarks/declarative/binding/tst_binding.cpp b/tests/benchmarks/declarative/binding/tst_binding.cpp index 5dce36d31d..70796f682a 100644 --- a/tests/benchmarks/declarative/binding/tst_binding.cpp +++ b/tests/benchmarks/declarative/binding/tst_binding.cpp @@ -186,7 +186,8 @@ void tst_binding::creation() COMPONENT(file, binding); QBENCHMARK { - c.create(); + QObject *o = c.create(); + delete o; } } |