How to get i.MX6 OpenGL ES shader language compiler?

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

How to get i.MX6 OpenGL ES shader language compiler?

Jump to solution
3,080 Views
garyyin
Contributor III

I want to compile shader source first, then load the binary in OpenGL ES code. Both linux and windows versions are prefered. But I can't find the compiler.Could you help me?

Tags (3)
1 Solution
2,137 Views
claymontgomery
Contributor IV

The examples in Vivante's SDK are largely copied from the PowerVR SDK examples (and the old NeHe examples). You should not infer too much about what is supported from them. One of the reasons they don't release the GLSL compiler separate from the drivers is because the actual microcode that the compiler produces can be different across different releases of the Vivante cores and even i.MX6 chip releases. In other words, the binary microcode is not portable across older and newer versions of the i.MX6 series. The situation is the same with the TI OMAP series and their PowerVR cores and probably with Nvidia as well.

View solution in original post

0 Kudos
9 Replies
2,137 Views
claymontgomery
Contributor IV

The GLSL shader compiler for OpenGL ES 2.0 and 3.0 is built into the GLES2 and GLES3 device drivers. This is required because shader programs are compiled at run-time, on the embedded device. So what you are really asking for is the source code to Vivante's OpenGL drivers, which they do not release.

Regards, Clay

0 Kudos
2,137 Views
garyyin
Contributor III

But what's the purpose of the example which shows loading pre-compiled binary shader?

The example introduces "glProgramBinaryOES()" function.

0 Kudos
2,138 Views
claymontgomery
Contributor IV

The examples in Vivante's SDK are largely copied from the PowerVR SDK examples (and the old NeHe examples). You should not infer too much about what is supported from them. One of the reasons they don't release the GLSL compiler separate from the drivers is because the actual microcode that the compiler produces can be different across different releases of the Vivante cores and even i.MX6 chip releases. In other words, the binary microcode is not portable across older and newer versions of the i.MX6 series. The situation is the same with the TI OMAP series and their PowerVR cores and probably with Nvidia as well.

0 Kudos
2,137 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Gary Yin,

Please look at the GPU demo framework SDK (link below, please note that you may need to login in order to download this file) which includes also documentation on how to compile OpenGL ES code (and it also comes with some examples).

i.MX6D/Q/DL/S/SX GPU Demo Framework SDK

https://www.nxp.com/webapp/Download?colCode=FSL_GPU_SDK_2.3&appType=license&location=null&fpsp=1&WT_...

Regards,

2,137 Views
garyyin
Contributor III

Thanks.

There is GLESx example which uses pre-compiled binary, but I can't find the compiler inside.

0 Kudos
2,137 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Gary Yin,

My apologies. The compiler comes as a binary as its intellectual property of the GPU designer so source code for it cannot be provided.

Regards,

0 Kudos
2,137 Views
garyyin
Contributor III

The pre-compiled compiler is OK, I do not need the source code. The problem is I can't find the pre-compiled version neither.

The "binary" I mentioned in previous post is the binary-shader, generated from the shader source code. Don't be confused.

0 Kudos
2,137 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Gary Tin,

I apologize for the confusion. Al libraries required to compile OpenGL ES code are included in the SDK bundle. You would need to use them to setup the makefile configuration and then compile your OpenGL ES code using the BSP Toolchain (please use the i.MX6 BSP toolchain are other toolchains like Linaro may not work correctly with the libraries.

Regards,

0 Kudos
2,137 Views
garyyin
Contributor III

So, NXP can't provide the shader language compile. User can only use the runtime compiling mode. If so, I won't spand time on this issue.

0 Kudos