diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2019-11-08 10:28:54 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2019-11-13 07:32:32 +0100 |
commit | 53a780960aa5245eb3e534e6bd0c268c050c52fa (patch) | |
tree | 37877a9cc69a906c3496807c40d4a709397f1f22 /src/render | |
parent | 714731b0e8bc34ebd5873c8818830a8ee89045d5 (diff) |
Uniform: use QVarLengthArray<16 ,float> instead of <4, float>
This otherwise yield for lots of reallocations that could be avoided.
The gains seem to be about 2/3% of cpu usage according the analysis
with vTune.
It does indeed mean that for smaller uniforms vec4, float, sampler
we are wasting a bit of memory. The impact of this is likely to be
unsignificant though.
Change-Id: Id72c81a795bf9326ef48b170bb0806de9b430412
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/backend/uniform_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/backend/uniform_p.h b/src/render/backend/uniform_p.h index 09575a077..634c0cd96 100644 --- a/src/render/backend/uniform_p.h +++ b/src/render/backend/uniform_p.h @@ -229,7 +229,7 @@ public: private: // Allocate 4 floats on stack // For larger elements, heap allocation will be used - QVarLengthArray<float, 4> m_data; + QVarLengthArray<float, 16> m_data; ValueType m_valueType = ScalarValue; |