virtio-gpu does a set-scanout at each frame (it might be a driver
regression). qemu_console_resize() recreate a surface even if the size
didn't change, and this shows up in profiling reports because the
surface is cleared. With this patch, I get a +15-20% glmark2
improvement.
Interesting, the culprit is:
commit cd958edb1fae85d 0c7d1e1acbff82d 22724e8d64
Author: Marc-André Lureau <email address hidden>
Date: Fri Aug 26 13:47:11 2016 +0400
console: skip same-size resize
virtio-gpu does a set-scanout at each frame (it might be a driver resize( ) recreate a surface even if the size
regression). qemu_console_
didn't change, and this shows up in profiling reports because the
surface is cleared. With this patch, I get a +15-20% glmark2
improvement.
Signed-off-by: Marc-André Lureau <email address hidden>
Message-id: <email address hidden>
Signed-off-by: Gerd Hoffmann <email address hidden>
diff --git a/ui/console.c b/ui/console.c .394786b3c7 100644 resize( QemuConsole *s, int width, int height)
index 3940762851.
--- a/ui/console.c
+++ b/ui/console.c
@@ -2101,6 +2101,13 @@ void qemu_console_
DisplaySurface *surface;
assert( s->console_ type == GRAPHIC_CONSOLE); image_get_ width(s- >surface- >image) == width && image_get_ height( s->surface- >image) == height) {
+
+ if (s->surface &&
+ pixman_
+ pixman_
+ return;
+ }