aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmarks/manual
diff options
context:
space:
mode:
Diffstat (limited to 'src/benchmarks/manual')
-rw-r--r--src/benchmarks/manual/gputhroughput/README.md16
-rw-r--r--src/benchmarks/manual/gputhroughput/blendedrect.qml18
-rw-r--r--src/benchmarks/manual/gputhroughput/blendedtexture.qml20
-rw-r--r--src/benchmarks/manual/gputhroughput/drawcalls.qml44
-rw-r--r--src/benchmarks/manual/gputhroughput/gaussblur.qml39
-rwxr-xr-xsrc/benchmarks/manual/gputhroughput/grapes.jpgbin0 -> 304492 bytes
-rw-r--r--src/benchmarks/manual/gputhroughput/opaquerect.qml19
-rw-r--r--src/benchmarks/manual/gputhroughput/opaquetexture.qml27
-rw-r--r--src/benchmarks/manual/v8bench/README.md10
-rw-r--r--src/benchmarks/manual/v8bench/v8-Crypto.qml10
-rw-r--r--src/benchmarks/manual/v8bench/v8-DeltaBlue.qml10
-rw-r--r--src/benchmarks/manual/v8bench/v8-EarleyBoyer.qml10
-rw-r--r--src/benchmarks/manual/v8bench/v8-RayTrace.qml10
-rw-r--r--src/benchmarks/manual/v8bench/v8-RegExp.qml10
-rw-r--r--src/benchmarks/manual/v8bench/v8-Richards.qml10
-rw-r--r--src/benchmarks/manual/v8bench/v8-Splay.qml10
16 files changed, 263 insertions, 0 deletions
diff --git a/src/benchmarks/manual/gputhroughput/README.md b/src/benchmarks/manual/gputhroughput/README.md
new file mode 100644
index 0000000..28800bb
--- /dev/null
+++ b/src/benchmarks/manual/gputhroughput/README.md
@@ -0,0 +1,16 @@
+# gputhroughput
+
+These benchmarks test your GPU for the most part. The QML part is mostly there
+to set things up and the benchmark will fill the graphics pipeline with enough
+stuff to make it suffer.
+
+**Note**! These tests are only designed to be used with the sustained-fps shell.
+
+The purpose of these benchmarks is to give an indication how how much one can
+expect to put on screen, and to decide how big the screen can actually be.
+Especially in the embedded space where a low end chip may have to drive an HD
+display, these tests can help to illustrate if the GPU is up to the task or not.
+
+Run them in --fullscreen to get the right numbers. 1 means your in trouble. 2 means
+you can manage with a lot of work. 4 and above and you should be good shape, GPU-wise.
+
diff --git a/src/benchmarks/manual/gputhroughput/blendedrect.qml b/src/benchmarks/manual/gputhroughput/blendedrect.qml
new file mode 100644
index 0000000..cd0d2c6
--- /dev/null
+++ b/src/benchmarks/manual/gputhroughput/blendedrect.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.0
+
+// Stacks x number of alphablended rectangles on top of each other.
+// Rough test of fillrate.
+Item {
+ id: root;
+ property int count: 10
+ property int staticCount: 0
+
+ Repeater {
+ model: root.count;
+ Rectangle {
+ width: root.width
+ height: root.height
+ color: Qt.hsla((index * .271) % 1.0, 0.5, 0.5, 0.5);
+ }
+ }
+}
diff --git a/src/benchmarks/manual/gputhroughput/blendedtexture.qml b/src/benchmarks/manual/gputhroughput/blendedtexture.qml
new file mode 100644
index 0000000..51f067e
--- /dev/null
+++ b/src/benchmarks/manual/gputhroughput/blendedtexture.qml
@@ -0,0 +1,20 @@
+import QtQuick 2.0
+
+// Stacks x number of alphablended textures on top of each other.
+// Rouch test of fill and texel rate.
+Item {
+ id: root;
+ property int count: 8;
+ property int staticCount: 0
+
+ Repeater {
+ model: root.count;
+ Rectangle {
+ width: root.width
+ height: root.height
+ color: Qt.hsla((index * .271) % 1.0, 0.5, 0.5, 0.5);
+ layer.enabled: true
+ layer.format: ShaderEffectSource.RGBA
+ }
+ }
+}
diff --git a/src/benchmarks/manual/gputhroughput/drawcalls.qml b/src/benchmarks/manual/gputhroughput/drawcalls.qml
new file mode 100644
index 0000000..babf179
--- /dev/null
+++ b/src/benchmarks/manual/gputhroughput/drawcalls.qml
@@ -0,0 +1,44 @@
+import QtQuick 2.0
+
+// Take this one with a grain of salt. Graphics drivers have a
+// lot of overhead in how drawing is set up, and seeing an individual GL call take
+// up to a millisecond (yes, a millisecond) is not uncommon. This test is a highly
+// constructed case to try to get a rough ballpart of how many discrete draw calls
+// the GL stack is capable of.
+//
+// This is mostly important if you end up with an application that fails to do
+// batching in the scene graph renderer, but as this situation will typically
+// have many other performance problems, this may not be a useful benchmark for
+// the most part.
+Item {
+ id: root;
+
+ property real cellSize: Math.floor(Math.sqrt(width * height / (count / 2)))
+ property int count: 250
+ property int staticCount: 0
+
+ Grid {
+ width: root.width
+ height: root.height
+ columns: Math.ceil(root.width / root.cellSize);
+ rows: Math.ceil(root.height / root.cellSize);
+ Repeater {
+ model: root.count / 2
+ Rectangle {
+ opacity: 0.9
+ width: root.cellSize
+ height: root.cellSize
+ color: Qt.hsla(index / count, 0.5, 0.5);
+ Image {
+ // partially overlap the next cells to provoke separate draw calls.
+ x: parent.width / 2
+ y: parent.height / 2
+ width: x + 2
+ height: y + 2
+ sourceSize: Qt.size(width, height);
+ source: "qrc:///shared/butterfly-wide.png"
+ }
+ }
+ }
+ }
+}
diff --git a/src/benchmarks/manual/gputhroughput/gaussblur.qml b/src/benchmarks/manual/gputhroughput/gaussblur.qml
new file mode 100644
index 0000000..8c8860e
--- /dev/null
+++ b/src/benchmarks/manual/gputhroughput/gaussblur.qml
@@ -0,0 +1,39 @@
+import QtQuick 2.2
+import QtGraphicalEffects 1.0
+
+// This benchmark is added to test how feasible live blurring
+// is. Live blurring is an extreme fillrate test and is only something that
+// should be considered on gaming and industrial hardware. And then you still
+// probably want to cheat :p
+Item {
+ id: root;
+ property int count: 8
+ property int maxCount: 32;
+ property int staticCount: 0
+
+ width: 600
+ height: 600
+
+ Image {
+ id: contentRoot
+ anchors.fill: parent
+ fillMode: Image.PreserveAspectCrop
+ source: "grapes.jpg"
+ Rectangle {
+ color: "palegreen"
+ border.color: "black"
+ width: parent.width / 3
+ height: parent.width / 3
+ RotationAnimator on rotation { from: 0; to: 360; duration: 10000; loops: Animation.Infinite }
+ anchors.centerIn: parent
+ antialiasing: true
+ }
+
+ layer.enabled: true
+ layer.effect: GaussianBlur {
+ samples: root.count
+ radius: root.count
+ deviation: Math.sqrt(root.count)
+ }
+ }
+}
diff --git a/src/benchmarks/manual/gputhroughput/grapes.jpg b/src/benchmarks/manual/gputhroughput/grapes.jpg
new file mode 100755
index 0000000..a6c2213
--- /dev/null
+++ b/src/benchmarks/manual/gputhroughput/grapes.jpg
Binary files differ
diff --git a/src/benchmarks/manual/gputhroughput/opaquerect.qml b/src/benchmarks/manual/gputhroughput/opaquerect.qml
new file mode 100644
index 0000000..dd1a07b
--- /dev/null
+++ b/src/benchmarks/manual/gputhroughput/opaquerect.qml
@@ -0,0 +1,19 @@
+import QtQuick 2.0
+
+// Stacks x number of opaque rectangles on top of each other.
+// Will go a lot higher than blendedrect if the target hardware supprts
+// [early-z](https://en.wikipedia.org/?title=Z-buffering)
+Item {
+ id: root;
+ property int count: 16;
+ property int staticCount: 0
+
+ Repeater {
+ model: root.count;
+ Rectangle {
+ width: root.width
+ height: root.height
+ color: Qt.hsla((index * .271) % 1.0, 0.5, 0.5);
+ }
+ }
+}
diff --git a/src/benchmarks/manual/gputhroughput/opaquetexture.qml b/src/benchmarks/manual/gputhroughput/opaquetexture.qml
new file mode 100644
index 0000000..07762e0
--- /dev/null
+++ b/src/benchmarks/manual/gputhroughput/opaquetexture.qml
@@ -0,0 +1,27 @@
+import QtQuick 2.0
+
+// Stacks x number of opaque textures on top of each other.
+// Will go a lot higher than blendedtexture if target hardware supports
+// [early-z](https://en.wikipedia.org/?title=Z-buffering)
+Item {
+ id: root;
+
+ property int count;
+ property int staticCount: 0
+
+ Repeater {
+ model: root.count;
+ Rectangle {
+ width: root.width
+ height: root.height
+ color: Qt.hsla((index * .271) % 1.0, 0.5, 0.5);
+ z: index
+ layer.enabled: true
+ layer.effect: ShaderEffect {
+ blending: false
+ }
+ }
+ }
+
+
+}
diff --git a/src/benchmarks/manual/v8bench/README.md b/src/benchmarks/manual/v8bench/README.md
new file mode 100644
index 0000000..5515a69
--- /dev/null
+++ b/src/benchmarks/manual/v8bench/README.md
@@ -0,0 +1,10 @@
+# v8bench
+
+This is a set of simple wrapper tests that invoke a particular test suite from
+the well known v8-bench test suite, that test different aspects of JavaScript
+performance.
+
+This uses qmlbench (rather than v8-bench.js) as the test harness in order to
+integrate with the rest of the tests, and perhaps also to give a more stable
+result (by running for a longer duration, and running repeatedly, as all
+qmlbench tests do).
diff --git a/src/benchmarks/manual/v8bench/v8-Crypto.qml b/src/benchmarks/manual/v8bench/v8-Crypto.qml
new file mode 100644
index 0000000..122e6c1
--- /dev/null
+++ b/src/benchmarks/manual/v8bench/v8-Crypto.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+V8Benchmark {
+ id: root
+ count: 10
+ staticCount: 10
+ suiteName: "Crypto"
+}
+
diff --git a/src/benchmarks/manual/v8bench/v8-DeltaBlue.qml b/src/benchmarks/manual/v8bench/v8-DeltaBlue.qml
new file mode 100644
index 0000000..d5c8384
--- /dev/null
+++ b/src/benchmarks/manual/v8bench/v8-DeltaBlue.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+V8Benchmark {
+ id: root
+ count: 10
+ staticCount: 10
+ suiteName: "DeltaBlue"
+}
+
diff --git a/src/benchmarks/manual/v8bench/v8-EarleyBoyer.qml b/src/benchmarks/manual/v8bench/v8-EarleyBoyer.qml
new file mode 100644
index 0000000..e3ee075
--- /dev/null
+++ b/src/benchmarks/manual/v8bench/v8-EarleyBoyer.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+V8Benchmark {
+ id: root
+ count: 10
+ staticCount: 10
+ suiteName: "EarleyBoyer"
+}
+
diff --git a/src/benchmarks/manual/v8bench/v8-RayTrace.qml b/src/benchmarks/manual/v8bench/v8-RayTrace.qml
new file mode 100644
index 0000000..e7dafa0
--- /dev/null
+++ b/src/benchmarks/manual/v8bench/v8-RayTrace.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+V8Benchmark {
+ id: root
+ count: 10
+ staticCount: 10
+ suiteName: "RayTrace"
+}
+
diff --git a/src/benchmarks/manual/v8bench/v8-RegExp.qml b/src/benchmarks/manual/v8bench/v8-RegExp.qml
new file mode 100644
index 0000000..28afc50
--- /dev/null
+++ b/src/benchmarks/manual/v8bench/v8-RegExp.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+V8Benchmark {
+ id: root
+ count: 10
+ staticCount: 10
+ suiteName: "RegExp"
+}
+
diff --git a/src/benchmarks/manual/v8bench/v8-Richards.qml b/src/benchmarks/manual/v8bench/v8-Richards.qml
new file mode 100644
index 0000000..4b644b2
--- /dev/null
+++ b/src/benchmarks/manual/v8bench/v8-Richards.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+V8Benchmark {
+ id: root
+ count: 10
+ staticCount: 10
+ suiteName: "Richards"
+}
+
diff --git a/src/benchmarks/manual/v8bench/v8-Splay.qml b/src/benchmarks/manual/v8bench/v8-Splay.qml
new file mode 100644
index 0000000..d4040b8
--- /dev/null
+++ b/src/benchmarks/manual/v8bench/v8-Splay.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+V8Benchmark {
+ id: root
+ count: 10
+ staticCount: 10
+ suiteName: "Splay"
+}
+