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

QOpenGLShader add define base on macro GL_FRAGMENT_PRECISION_HIGH

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.1.0
    • GUI: OpenGL
    • None
    • Windows 8 x64, intel HD gfx

    Description

      QOpenGLShader wrap modify shader base on macro GL_FRAGMENT_PRECISION_HIGH

      Some gfx drivers simple don't understand ifdef or don't like redefinition

      For example android x86 emulator on intel HD (andorid x86 is compiled with GL_FRAGMENT_PRECISION_HIGH)

      crash with simply compilation of any quick 2.0 example:

      QOpenGLShader::compile(Fragment): ERROR: 0:3: '' : Macro Redefined highp
      W/Qt ( 3512):
      W/Qt ( 3512):
      W/Qt ( 3512): opengl\qopenglshaderprogram.cpp:325 (bool QOpenGLShaderPrivate::compile(QOpenGLShader*)): *** Problematic Fragment shader source code ***
      W/Qt ( 3512): opengl\qopenglshaderprogram.cpp:326 (bool QOpenGLShaderPrivate::compile(QOpenGLShader*)): #ifndef GL_FRAGMENT_PRECISION_HIGH
      W/Qt ( 3512): #define highp mediump
      W/Qt ( 3512): #endif
      W/Qt ( 3512): varying lowp vec4 color;
      W/Qt ( 3512): void main()

      { W/Qt ( 3512): gl_FragColor = color; W/Qt ( 3512): }

      next case:
      some mali400 drivers on linux don't compile shaders with this modification (don't understand #ifdef or #define)

      How to reproduce
      create quick 2.0 app from wizzard and run it on x86 android emulator

      Can we simple add some enviroment define that modify hgader compilation like GL_FRAGMENT_PRECISION_HIGH ??

      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
              miskol MICHAL LAZO
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes