summaryrefslogtreecommitdiffstats
path: root/src/render/backend/uniform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/backend/uniform.cpp')
-rw-r--r--src/render/backend/uniform.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/render/backend/uniform.cpp b/src/render/backend/uniform.cpp
index 12b496161..92fb077f7 100644
--- a/src/render/backend/uniform.cpp
+++ b/src/render/backend/uniform.cpp
@@ -239,7 +239,9 @@ UniformValue UniformValue::fromVariant(const QVariant &variant)
if (listEntryType == qNodeIdTypeId)
v.m_valueType = NodeId;
- const int stride = byteSizeForMetaType(listEntryType) / sizeof(float);
+ v.m_elementByteSize = byteSizeForMetaType(listEntryType);
+ const int stride = v.m_elementByteSize / sizeof(float);
+
// Resize v.m_data
v.m_data.resize(stride * variants.size());