Created attachment 144542 [details] glxinfo from guest Hi! I was testing virgl on nv50 and llvmpipe. It was working last year, showing OpenGL 3.3 in Linux guest. Now it only displays OpenGL 2.1 [but still works] LIBGL_ALWAYS_SOFTWARE=1 qemu-system-x86_64 -enable-kvm -m 1G -display sdl,gl=on -soundhw es1370 -cdrom /mnt/sdb1/slax-14_06_2019-private0.iso -vga virtio -usbdevice mouse -smp 3 -cpu max qemu-system-x86_64: -usbdevice mouse: '-usbdevice' is deprecated, please use '-device usb-...' instead gl_version 33 - core profile enabled Mesa: User error: GL_INVALID_VALUE in glTexImage2D(internalFormat=GL_ALPHA8) Mesa: User error: GL_INVALID_VALUE in glTexImage2D(internalFormat=GL_ALPHA16) GLSL feature level 330 In guest: Extended renderer info (GLX_MESA_query_renderer): Vendor: Red Hat (0x1af4) Device: virgl (0x1010) Version: 19.2.0 Accelerated: yes Video memory: 0MB Unified memory: no Preferred profile: compat (0x2) Max core profile version: 0.0 Max compat profile version: 2.1 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.0 OpenGL version string: 2.1 Mesa 19.2.0-devel (git-83829abe03)
Created attachment 144543 [details] glxinfo from host (llvmpipe)
Created attachment 144544 [details] glxinfo from host (nv50)
FWIW GL_ALPHA8/16 are not valid in a core profile.
Looks like ARB_framebuffer_sRGB is not provided for some reason by virgl. There was recently reworked in virgl to try to be more precise, esp in ES, and I suspect something here ended up as a casualty... extensions->EXT_framebuffer_sRGB = screen->get_param(screen, PIPE_CAP_DEST_SURFACE_SRGB_CONTROL) && extensions->EXT_sRGB; Where EXT_sRGB is controlled by: { { o(EXT_sRGB) }, { PIPE_FORMAT_A8B8G8R8_SRGB, PIPE_FORMAT_B8G8R8A8_SRGB, PIPE_FORMAT_R8G8B8A8_SRGB }, GL_TRUE }, /* at least one format must be supported */ And the cap is controlled by: case PIPE_CAP_DEST_SURFACE_SRGB_CONTROL: return vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_SRGB_WRITE_CONTROL; Probably one or both of those is false for some silly reason. Could even be due to an older version of the virgl "server" component which doesn't include that capability bit.
(In reply to Ilia Mirkin from comment #4) > Looks like ARB_framebuffer_sRGB is not provided for some reason by virgl. Oddly enough, when I rebuild my live-dvd with new (5.1.6 , 64-bit) kernel - it started to show 3.3/3.1 :} So, only old (4.12.0 in my case) kernel(s) were affected.
With Kernel 4.16.0 support for the v2 caps data was introduces, and caps.caps.v2.capability_bits is part of these v2 caps. So if the guest kernel is older than this cap will not be reported. We'll see whether it makes sense to work around this or simply document the minimal requirements better.
This should fix it: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1108
The MR was merged, and the fix included in Mesa 19.1.1.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.