From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bk0-f51.google.com (mail-bk0-f51.google.com [209.85.214.51]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 4F228E01463 for ; Thu, 17 Jan 2013 06:37:50 -0800 (PST) Received: by mail-bk0-f51.google.com with SMTP id ik5so1419386bkc.10 for ; Thu, 17 Jan 2013 06:37:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:x-gm-message-state; bh=DLD069QaKxs2asBifYcGow0P/8TAMtagf3Szlpdfyoc=; b=Oq1k36fUGf+EZfFHhNhTh0hl3GiGMl4Y+DPAX2OFhMXrkmPsZyVgSPln6kdLwMV3yj /ql9XXgObSF624Jt+FzqCE1HK9xpDysPo9morS6GURzPlyh9+S47EAUlnfR19y7yk0OF bXmnOFng0f6yENTRiJy9uTGE3P/jYs09+eBu6MLTB9a0SJUNAw9Ha+69ILxns5vm1VgQ WYRoc8Q89RTZT5OXEZqkM5vnwkRoQs/TowQr5BdGVXAPCynDT28ThD/f0XEqbz9yFo0o Kdee1imOxdd9/NCJolDpyQ60HYQX7QTgKhYsPZgxiPS4isOnpyGHR2YzR3p9DlXXnXIF NmWA== X-Received: by 10.204.4.133 with SMTP id 5mr1660196bkr.21.1358433468872; Thu, 17 Jan 2013 06:37:48 -0800 (PST) Received: from rudolf.localnet (mnch-5d85a4fd.pool.mediaWays.net. [93.133.164.253]) by mx.google.com with ESMTPS id e22sm1410380bke.14.2013.01.17.06.37.47 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Jan 2013 06:37:48 -0800 (PST) From: Thomas Senyk To: meta-freescale@yoctoproject.org Date: Thu, 17 Jan 2013 15:37:46 +0100 Message-ID: <3098459.WXlKcWq7AS@rudolf> Organization: Nokia User-Agent: KMail/4.9.5 (Linux/3.6.11-1-ARCH; KDE/4.9.5; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnM853fuzsPO3ImSOulRpT25waO+lvS8V7kjEHLRokTny60jQD/Gq71eivxNWLEUIEZAlDf Subject: Re: Problem with shader compiler X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2013 14:37:50 -0000 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" On Thu, January 17, 2013 13:49:46 Erik Bot=F6 wrote: > Hi, >=20 > I'm using meta-fsl-arm with an imx6 sabrelite board, kernel 3.0.35 > + gpu-viv-bin-mx6q_12.09.01. >=20 > I use the sysroot from poky to build Qt5, but then run in to some pro= blems > with shaders. They seem to stem from the fact that the shader compile= r > doesn't support #define and/or #ifdef. >=20 > Example: >=20 > QOpenGLShader::compile(Fragment): (5:0) : error : syntax error >=20 > *** 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 =3D texture2D(texture, textureCoord).bgra; > } >=20 > *** >=20 > It can be manually fixed by exchanging all occurences of highp with > mediump, instead of relying on the preprocessor macros. The shader co= mpiler > 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 ***=20 Warning: #ifndef GL_FRAGMENT_PRECISION_HIGH #define highp mediump #endif varying highp vec2 qt_TexCoord; =20 uniform sampler2D qt_Texture; =20 void main() { =20 gl_FragColor =3D texture2D(qt_Texture, qt_TexCoord); } If one removes the the 3 "#ifndef ... #endif" lines it works. Maybe the GLSL-preprocessor is broken? Greets Thomas >=20 > Best Regards, > Erik Bot=F6