summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2019-12-11 17:43:27 +0000
committerMike Krus <mike.krus@kdab.com>2019-12-13 07:09:45 +0000
commitcfaa43c554ef3e9d1e2ebf1cbdbbb8ce1bdcbe59 (patch)
treef1ef5396f888ce55eb3f5c4d91820f7ff1a7841f /src/render
parent07c6f38d38b32169a5bf80e5fe2db4b3b4cf2635 (diff)
Always get the estimate primitive count from the attribute
Previously were checking that the attribute was actually but due to refactoring the shader is not yet examined at this point. With this change, we always get the estimated number of points from the attributes. Potentially it means we're getting it from an attribute that is not being used but the user should then set the correct number on the geometry renderer anyway. Task-number: QTBUG-80697 Change-Id: Ie34131fe3ff41b34609a2f2eb95c4ff678424036 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render')
-rw-r--r--src/render/renderers/opengl/renderer/renderview.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/render/renderers/opengl/renderer/renderview.cpp b/src/render/renderers/opengl/renderer/renderview.cpp
index 3612d8767..d7e34e16c 100644
--- a/src/render/renderers/opengl/renderer/renderview.cpp
+++ b/src/render/renderers/opengl/renderer/renderview.cpp
@@ -686,11 +686,9 @@ EntityRenderCommandData RenderView::buildDrawRenderCommands(const QVector<Entity
case QAttribute::DrawIndirectAttribute:
indirectAttribute = attribute;
break;
- case QAttribute::VertexAttribute: {
- if (command.m_activeAttributes.contains(attribute->nameId()))
- estimatedCount = std::max(int(attribute->count()), estimatedCount);
+ case QAttribute::VertexAttribute:
+ estimatedCount = std::max(int(attribute->count()), estimatedCount);
break;
- }
default:
Q_UNREACHABLE();
break;