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

QOpenGLShaderProgram: glProgramBinary() resulting in LINK_STATUS=FALSE not handled properly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.9, 5.10.1, 5.10, 5.11
    • Fix Version/s: 5.9.5, 5.11.0
    • Component/s: GUI: OpenGL
    • Labels:
      None
    • Commits:
      fa091640134b3ff99a9eb92df8286d15203122bf

      Description

      Reported in freedesktop.org bug: https://bugs.freedesktop.org/show_bug.cgi?id=105065

      When glProgramBinary() results in LINK_STATUS = FALSE, this path through the code causes an empty program to be linked instead of with the provided shaders:
      1) qopenglshaderprogram.cpp:3825: if (binCache.load(cacheKey, q->programId())) {

      does glProgramBinary(). Mesa doesn't like the binary and sets the link
      status to failure.

      2) qopenglshaderprogram.cpp:3825: bool ok = q->link();

      To check link status

      3) qopenglshaderprogram.cpp:1297: d->glfuncs->glGetProgramiv(program, GL_LINK_STATUS, &value);

      Sees that glProgramBinary set link status to failed.

      4) qopenglshaderprogram.cpp:1303: d->glfuncs->glLinkProgram(program);

      Links the program, however no shaders have been attached. Because a
      compat context is being used, this is valid and linking succeeds.

      5) qopenglshaderprogram.cpp:1324: return d->linked;

      returns true;

      6) qopenglshaderprogram.cpp:3831: needsCompile = false;

      Won't try to compile, have a program with no shaders at this point.

        Attachments

          Issue Links

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

            Activity

              People

              • Assignee:
                alarrosa Antonio Larrosa
                Reporter:
                scott-ph Scott D Phillips
              • Votes:
                1 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes