Bisected: 176e3783 results in a heavy performance regression with the SDL interface
Host environment
- Operating system: Gentoo Linux
- OS/kernel version: linux 6.10.0-rc7-x86_64 + patches "KVM: Stop grabbing references to PFNMAP'd pages"
- Architecture: x86
- QEMU flavor: qemu-system-x86_64
- QEMU version: git 1581a0bc
- QEMU command line:
qemu-system-x86_64 -m 8G -enable-kvm -drive file=debian-sid.img,if=virtio -device virtio-vga-gl -display sdl,gl=on
Emulated/Virtualized environment
- Operating system: Debian Linux (sid), XFCE4 desktop
- OS/kernel version: 6.10.6-amd64
- Architecture: x86
Description of problem
With the patch 176e3783 a significant 3D performance regression was introduced when using the SDL gui and VirGL. Before the patch glxgears runs at about 4000 FPS on my machine, with the patch this drops to about 150 FPS, and if one moves the mouse the reported frame rate drops even more.
Steps to reproduce
- Run the qemu like given above with a current Debian-SID guest
- Start glxgears from a terminal
- Move the mouse continuously to see the extra drop in frame rate
Additional information
- (Guest) OpenGL Renderer string: virgl (AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 18.1.8 ...)
- Reverting the commit 176e3783 fixes the problem on SDL
- I don't think the host kernel version is an issue here (namely the KVM patches that are required to run Venus on discrete graphics cards)
- I've seen a similar issue when using GTK, but other that with SDL it's already present in version 7.2.11 (the one I used as a "good" base when I was bisecting the regression) - so I was not able to bisect yet.
- I've looked around in the code and I'm aware the that commit shouldn't have the impact it seems to have. I can only assume that there is some unexpected side effect when creating the otherwise unused renderer.