summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2019-11-08 10:28:54 +0100
committerPaul Lemire <paul.lemire@kdab.com>2019-11-13 07:32:32 +0100
commit53a780960aa5245eb3e534e6bd0c268c050c52fa (patch)
tree37877a9cc69a906c3496807c40d4a709397f1f22 /tests
parent714731b0e8bc34ebd5873c8818830a8ee89045d5 (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 'tests')
-rw-r--r--tests/auto/render/uniform/tst_uniform.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/render/uniform/tst_uniform.cpp b/tests/auto/render/uniform/tst_uniform.cpp
index 5f946afa3..d7775eb62 100644
--- a/tests/auto/render/uniform/tst_uniform.cpp
+++ b/tests/auto/render/uniform/tst_uniform.cpp
@@ -112,7 +112,7 @@ private Q_SLOTS:
QCOMPARE(v.constData<float>()[0], 572.0f);
QCOMPARE(v.constData<float>()[1], 355.0f);
QCOMPARE(v.constData<float>()[2], 383.0f);
- QCOMPARE(v.constData<float>()[4], 0.0f);
+ QCOMPARE(v.constData<float>()[3], 0.0f);
}
{
// GIVEN