OK, thanks. In that case the correct status of the bug is "Fix
Released". If we knew *what* change fixed it then we could try to get
the same fix into 18.04. Probably Mesa, I guess?

** Changed in: libsdl2 (Ubuntu)
       Status: Incomplete => Fix Released

** Changed in: mesa (Ubuntu)
       Status: Incomplete => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mesa in Ubuntu.
https://bugs.launchpad.net/bugs/1902853

Title:
  Failure to create core GL context with llvmpipe when using
  GLX_ARB_context_flush_control

Status in libsdl2 package in Ubuntu:
  Fix Released
Status in mesa package in Ubuntu:
  Fix Released

Bug description:
  When using llvmpipe on the non-HWE xorg version GL core context
  creation fails when using "GLX_ARB_context_flush_control" even though
  the driver reports that the extension is supported.

  Apologies if xorg is the wrong package here, this could be a libgl1
  -mesa-dri/glx bug instead, it's unclear to me where the fault lies in
  the graphics stack.

  xserver-common:
    Installed: 2:1.19.6-1ubuntu4.7
    Candidate: 2:1.19.6-1ubuntu4.7
  linux-generic:
    Installed: 4.15.0.122.109
    Candidate: 4.15.0.122.109

  Steps to reproduce on Ubuntu Server:
  1. Install Ubuntu 18.04 server edition in a VM, or other hardware without a 
physical graphics device
  2. Install the desktop with "sudo apt install ubuntu-desktop"
  3. Reboot
  4. Compile and run the attached file

  Steps to reproduce on Ubuntu Desktop:
  1. Install Ubuntu 18.04 desktop edition in a VM, or other hardware without a 
physical graphics device
  2. Remove the HWE packages with "apt remove *-hwe-18.04" and then "apt 
install xserver-xorg-core ubuntu-desktop xserver-xorg xserver-xorg-video-all 
xserver-xorg-input-all libgl1-mesa-dri libgl1-mesa-glx" to get things back to 
normal
  3. Reboot
  4. Compile and run the attached file

  Both examples produce:
  "Could not create GL context: BadValue (integer parameter out of range for 
operation)"

  For both cases, upgrading to (or staying on) the HWE stack allows
  creating the core 3.3 context successfully.

  
  Debugging:

  I've stepped all the way into libxcb for the context creation at
  src/glx.c:3258, with a call to
  "xcb_glx_create_context_attribs_arb_checked", but haven't managed to
  link this up to a received request in another process. The request is
  rejected with BadValue.

  BadVaue in this instance could mean one of two things according to GL spec:
  1. The GLX_RENDER_TYPE attribute is invalid
  2. An attribute or it's bitmask are not recognized.

  We can likely rule out 1 as GLX_RENDER_TYPE is correctly set to
  opengl. Option 2 allows looking at it at a higher level. SDL2 adds
  `GLX_CONTEXT_RELEASE_BEHAVIOUR_ARB=GLX_CONTEXT_RELEASE_BEHAVIOUR_FLUSH_ARB`
  to the attributes (at src/video/x11/SDL_x11opengl.c:720) by default
  when it detects the `GLX_ARB_context_flush_control` extension is
  present, which should be a no-op and the default setting. `glxinfo`
  and other gl functions all show that `GLX_ARB_context_flush_control`
  is present, but removing that usage from the attributes list (by
  removing lines 720 to 726 avoids the issue and we are given a valid GL
  context.

  Due to this, I think something in the graphics stack is rejecting the
  usage of GLX_ARB_context_flush_control, even though it's claiming to
  support it through other gl calls. The llvmpipe GL driver reports core
  support up to 3.3 as well, so this shouldn't be an issue. I also
  suspect it's simply something that's been fixed more recently, as
  installing the newer HWE versions of xorg (and the kernel) fixes the
  issue.

  
  I wouldn't expect to have to upgrade to the HWE stack to be able to get a 
working GL context this way, so I'm reporting this to check if it's a known 
issue or if there's a fix that can be made.

  The attached file depends on "libsdl2-dev" and can be compiled and run with:
  "g++ main.cpp -I/usr/include/SDL2 -lSDL2 -lGL && ./a.out"

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: xorg 1:7.7+19ubuntu7.1
  ProcVersionSignature: Ubuntu 5.4.0-52.57~18.04.1-generic 5.4.65
  Uname: Linux 5.4.0-52-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7.18
  Architecture: amd64
  CompositorRunning: None
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Nov  4 09:16:16 2020
  DistUpgraded: Fresh install
  DistroCodename: bionic
  DistroVariant: ubuntu
  ExtraDebuggingInterest: Yes, including running git bisection searches
  GraphicsCard:
   VMware SVGA II Adapter [15ad:0405] (prog-if 00 [VGA controller])
     Subsystem: VMware SVGA II Adapter [15ad:0405]
  InstallationDate: Installed on 2020-11-03 (0 days ago)
  InstallationMedia: Ubuntu-Server 18.04.5 LTS "Bionic Beaver" - Release amd64 
(20200806.1)
  Lsusb:
   Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
   Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  MachineType: innotek GmbH VirtualBox
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=C.UTF-8
   SHELL=/bin/bash
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.4.0-52-generic 
root=/dev/mapper/ubuntu--vg-ubuntu--lv ro maybe-ubiquity
  Renderer: Software
  SourcePackage: xorg
  Symptom: display
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 12/01/2006
  dmi.bios.vendor: innotek GmbH
  dmi.bios.version: VirtualBox
  dmi.board.name: VirtualBox
  dmi.board.vendor: Oracle Corporation
  dmi.board.version: 1.2
  dmi.chassis.type: 1
  dmi.chassis.vendor: Oracle Corporation
  dmi.modalias: 
dmi:bvninnotekGmbH:bvrVirtualBox:bd12/01/2006:svninnotekGmbH:pnVirtualBox:pvr1.2:rvnOracleCorporation:rnVirtualBox:rvr1.2:cvnOracleCorporation:ct1:cvr:
  dmi.product.family: Virtual Machine
  dmi.product.name: VirtualBox
  dmi.product.version: 1.2
  dmi.sys.vendor: innotek GmbH
  version.compiz: compiz N/A
  version.libdrm2: libdrm2 2.4.101-2~18.04.1
  version.libgl1-mesa-dri: libgl1-mesa-dri 20.0.8-0ubuntu1~18.04.1
  version.libgl1-mesa-glx: libgl1-mesa-glx 20.0.8-0ubuntu1~18.04.1
  version.xserver-xorg-core: xserver-xorg-core 2:1.19.6-1ubuntu4.7
  version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
  version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:18.0.1-1
  version.xserver-xorg-video-intel: xserver-xorg-video-intel 
2:2.99.917+git20171229-1
  version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.15-2

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libsdl2/+bug/1902853/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to