[meta-freescale] Problem with shader compiler

Erik Botö erik.boto at pelagicore.com
Thu Jan 17 04:49:46 PST 2013


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?

Best Regards,
Erik Botö
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20130117/251d9dc6/attachment.html>


More information about the meta-freescale mailing list