-display sdl renders vkcube incorrectly

Host environment

  • Operating system: Arch Linux
  • OS/kernel version: 6.17.8-arch1-1
  • Architecture: x86_64
  • QEMU flavor: qemu-system-x86_64
  • QEMU version: 10.1.2 (reproduces with git e88510fc)
  • QEMU command line:
qemu-system-x86_64 \
    -enable-kvm \
    -cpu host \
    -usb \
    -device virtio-vga-gl,hostmem=4g,blob=true,venus=true \
    -device usb-mouse \
    -device usb-tablet \
    -device usb-kbd \
    -m 16G \
    -smp 8 \
    -display sdl,gl=on,show-cursor=on \
    -hda arch.qcow2

Emulated/Virtualized environment

  • Operating system: Arch Linux
  • OS/kernel version: 6.17.8-arch1-1
  • Architecture: x86_64

Description of problem

vkcube is rendered incorrectly with SDL display backend while GTK backend works as expected

-display sdl: image -display gtk: image

Steps to reproduce

  1. Launch VM
  2. Run vkcube
  3. See broken image

Extra information

Originally found in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38457#note_3194448