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

`QOpenGLShader::compile(Vertex): Compile failed.` on embeded device

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 5.3.1
    • Quick: SceneGraph
    • None

    Description

      When i run my qml code in embeded device, log info shows that the vertex compile failed. log is below:

      QOpenGLShader::compile(Vertex): Compile failed.

          • Problematic Vertex shader source code ***
            uniform highp vec2 pixelSize;
            uniform highp mat4 qt_Matrix;
            uniform lowp float opacity;

      attribute highp vec4 vertex;
      attribute highp vec2 multiTexCoord;
      attribute highp vec2 vertexOffset;
      attribute highp vec2 texCoordOffset;

      varying highp vec2 texCoord;
      varying lowp float vertexOpacity;

      void main()
      {
      highp vec4 pos = qt_Matrix * vertex;
      gl_Position = pos;
      texCoord = multiTexCoord;

      if (vertexOffset.x != 0.)

      { highp vec4 delta = qt_Matrix[0] * vertexOffset.x; highp vec2 dir = delta.xy * pos.w - pos.xy * delta.w; highp vec2 ndir = .5 * pixelSize * normalize(dir / pixelSize); dir -= ndir * delta.w * pos.w; highp float numerator = dot(dir, ndir * pos.w * pos.w); highp float scale = 0.0; if (numerator < 0.0) scale = 1.0; else scale = min(1.0, numerator / dot(dir, dir)); gl_Position += scale * delta; texCoord.x += scale * texCoordOffset.x; }

      if (vertexOffset.y != 0.)

      { highp vec4 delta = qt_Matrix[1] * vertexOffset.y; highp vec2 dir = delta.xy * pos.w - pos.xy * delta.w; highp vec2 ndir = .5 * pixelSize * normalize(dir / pixelSize); dir -= ndir * delta.w * pos.w; highp float numerator = dot(dir, ndir * pos.w * pos.w); highp float scale = 0.0; if (numerator < 0.0) scale = 1.0; else scale = min(1.0, numerator / dot(dir, dir)); gl_Position += scale * delta; texCoord.y += scale * texCoordOffset.y; }

      bool onEdge = any(notEqual(vertexOffset, vec2(0.)));
      bool outerEdge = all(equal(texCoordOffset, vec2(0.)));
      vertexOpacity = onEdge && outerEdge ? 0. : opacity;
      }
      ***
      QOpenGLShader::link: "Link Error: Vertex shader is missing.
      "
      QSGMaterialShader: Shader compilation failed:
      "Link Error: Vertex shader is missing.
      "
      QOpenGLShaderProgram::uniformLocation( pixelSize ): shader program is not linked
      QOpenGLShaderProgram::uniformLocation( qt_Matrix ): shader program is not linked
      QOpenGLShaderProgram::uniformLocation( opacity ): shader program is not linked

      • compiling material: 43ms
        QOpenGLShader::link: "Link Error: Vertex shader is missing.

      And the Image antianalising has been set to true, while the Image show nothing but a white-black screen. Code is here:

      NQImage

      { source: "qrc:///textRenderTest/background.png" antialiasing: true }

      Attachments

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              efd efd
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes