[meta-freescale] Problem with shader compiler

Thomas Senyk thomas.senyk at pelagicore.com
Thu Jan 17 06:40:20 PST 2013


We can stop this ...
Just got notices that it's known and already fixed in the last BSP release 
(from Tuesday)


Thanks and sorry for the useless buzz :)
Greets
Thomas





On Thu, January 17, 2013 15:37:46 Thomas Senyk wrote:
> On Thu, January 17, 2013 13:49:46 Erik Botö wrote:
> > Hi,
> > 
> > I'm using meta-fsl-arm with an imx6 sabrelite board, kernel 3.0.35
> > + gpu-viv-bin-mx6q_12.09.01.
> > 
> > I use the sysroot from poky to build Qt5, but then run in to some problems
> > with shaders. They seem to stem from the fact that the shader compiler
> > doesn't support #define and/or #ifdef.
> > 
> > Example:
> > 
> > QOpenGLShader::compile(Fragment): (5:0) : error : syntax error
> > 
> > *** Problematic Fragment shader source code ***
> > #ifndef GL_FRAGMENT_PRECISION_HIGH
> > #define highp mediump
> > #endif
> > uniform sampler2D texture;
> > varying highp vec2 textureCoord;
> > void main() {
> > 
> >    gl_FragColor = texture2D(texture, textureCoord).bgra;
> > 
> > }
> > 
> > ***
> > 
> > It can be manually fixed by exchanging all occurences of highp with
> > mediump, instead of relying on the preprocessor macros. The shader
> > compiler
> > should support this, right?
> 
> Addition bug-report information:
> A error looks like that:
> 
> Warning: QOpenGLShader::compile(Fragment): (4:0) : error : syntax error
> Warning: *** Problematic Fragment shader source code ***
> Warning: #ifndef GL_FRAGMENT_PRECISION_HIGH
> #define highp mediump
> #endif
> varying highp vec2 qt_TexCoord;
> uniform sampler2D qt_Texture;
> void main() {
>     gl_FragColor = texture2D(qt_Texture, qt_TexCoord);
> }
> 
> If one removes the the 3 "#ifndef ... #endif" lines it works.
> Maybe the GLSL-preprocessor is broken?
> 
> 
> Greets
> Thomas
> 
> > Best Regards,
> > Erik Botö



More information about the meta-freescale mailing list