Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-40496

Misuse of GL_BGRA as internal format in TexImage2D call with only GL_EXT_BGRA available

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 5.3.1
    • Fix Version/s: None
    • Component/s: Quick: Other
    • Labels:
      None

      Description

      When running random QtQuick programs under Mesa 10.2.4 (radeonsi on a Radeon 7970), large number of elements are all black. Running the program with Mesa dumping debug information, the following is printed (sddm-greeter in this case):
      Mesa: User error: GL_INVALID_VALUE in glTexImage2D(internalFormat=GL_BGRA)
      Mesa: User error: GL_INVALID_VALUE in glTexImage2D(internalFormat=GL_BGRA)
      [00:46:12.322] (II) GREETER: QSGTextureAtlas: texture atlas allocation failed, code=501

      Investigating further, in qsgatlastexture.cpp on line 166, the if condition stopping the internal format from being set to GL_BGRA is satisfied by the GL_EXT_bgra extension being present (which it is). However, reading the specification (pulled from https://www.opengl.org/registry/specs/EXT/bgra.txt ), it appears that this is not sufficient to show that the internal format can be set to GL_BGRA. Commenting out the assignment line does indeed fix the problem, with the error message disappearing from sddm-greeter's output, and visual are rendered as expected.

      Note other random QtQuick programs are KWin and Plasma from the Plasma 5.0 release. I haven't tried running them with the quick fix yet (reporting this bug first). If they don't get fixed, I'll report my further findings.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            sletta Gunnar Sletta
            Reporter:
            mjdsys Matthew Dawson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes