GLES20: shader link error on IMX6 3.10.53 (uniform mismatch between vertex and fragment)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GLES20: shader link error on IMX6 3.10.53 (uniform mismatch between vertex and fragment)

Jump to solution
887 Views
sylvainlehenaff
Contributor III

Hi,

an application running fine on a SMARC IMX6 based on a Yocto (3.10.17 with Galcore module 4.9xx) is not running anymore since it has been places on another  Smarc running a yocto image based on a 3.10.53 kernel.(galcore v5.x)

Debugging the function, it came from an error on the shader part of the program. The fragment and the vertex shadder cannot be linked since the program is running on the new kernel.

The report show a uniform mismatch  between vertex and fragment shader.

The  shader  has been used  on several platform without problem. the vcompiler from vivante reports the same error.

Does anybody have a clue on the possible origin of the problem ?

Best regards

Sylvain

Ce message a été modifié par : sylvain LE HENAFF

Labels (3)
0 Kudos
1 Solution
663 Views
sylvainlehenaff
Contributor III

Hi,

We finally manage to make it works. The correction is the following (event if i don t know why it was working before)

My shadder (fragment & vertex) are using several uniform variable but only 4 are shared between both.

They were declared as

uniform int myUniForm1;

uniform int myUniForm2;

etc.

On a SMARC IMX6 (Kontron), the SW was running fine (kernel 3.10.17 with the associated librairy "libGLSLC" and a GALCORE module v4.9xx)

On a SMARC IMX6 from Adlink (kernel 3.10.53 and GALCORE module v5.0xx), the shadder is only working if the uniform are declared with their precision. It seems that a uniform variable that is used in both Vert. & Frag Shadder must be declared with its precision.

uniform lowp int myUniForm1;

uniform lowp int myUniForm2;

By adding the precision ("ie lowp") for each common uniform in both shadder, the shadder is now running fine.

The libGLSC.so from vivante has changed between kernel 3.10.17 and 3.10.53, they are probably more strict with this rule. (I should go back to the standard and find out the details)

We have not try on a kernel 3.14.28.

Regards,

Sylvain

View solution in original post

0 Kudos
2 Replies
664 Views
sylvainlehenaff
Contributor III

Hi,

We finally manage to make it works. The correction is the following (event if i don t know why it was working before)

My shadder (fragment & vertex) are using several uniform variable but only 4 are shared between both.

They were declared as

uniform int myUniForm1;

uniform int myUniForm2;

etc.

On a SMARC IMX6 (Kontron), the SW was running fine (kernel 3.10.17 with the associated librairy "libGLSLC" and a GALCORE module v4.9xx)

On a SMARC IMX6 from Adlink (kernel 3.10.53 and GALCORE module v5.0xx), the shadder is only working if the uniform are declared with their precision. It seems that a uniform variable that is used in both Vert. & Frag Shadder must be declared with its precision.

uniform lowp int myUniForm1;

uniform lowp int myUniForm2;

By adding the precision ("ie lowp") for each common uniform in both shadder, the shadder is now running fine.

The libGLSC.so from vivante has changed between kernel 3.10.17 and 3.10.53, they are probably more strict with this rule. (I should go back to the standard and find out the details)

We have not try on a kernel 3.14.28.

Regards,

Sylvain

0 Kudos
663 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi sylvain,

Could you please provide any sample code with the issue to see and reproduce in our side, Also please specify which kernel are you using? and if you have compiled this on latest kernel 3.14.28?

Regards

0 Kudos