issue with extension GL_OES_standard_derivatives

Hello everyone,

I’ve spent a whole day trying to figure out how to enable extension GL_OES_standard_derivatives. But i encountered some weird issues.

Basically, i want to call built-in functions ( dFdx(), dFdy() , fwidth()) in my fragment shader(See below).

        precision mediump float;

        #extension GL_OES_standard_derivatives : enable

        varying vec3 myVec;

        uniform vec4 vColor;

        void main() {n"

           vec3 px = dFdx(myVec);

           vec3 py = dFdy(myVec); // this line can not compile.

           gl_FragColor = vColor;


Whenever i add dFdy() , fwidth() to the shader, the fragment shader fails to compile with error message “Compile Failed”. But the strange thing is dFdx() can be compiled and linked successfully. I work on beagleboard C4 with Angstrom linux distro.

Could anyone give me a pointer on how to resolve this issue.

Thanks for any help or advice!

Add some more details.

When running on board, the shader compiler just said “Compile Failed” with no verbosity so I am stuck here. Do not know what is wrong with it.

Since dFdx() can be compiled and linked successfully, i guess the extension has been enabled, but some built-in functions (dFdy() , fwidth()) are missing.

BTW, the fragment shader can be compiled successfully on PC Emulation.

I use beagle board C4 (OMAP3530 - 720 MHz ARM Cortex A8 + PowerVR SGX530 GPU )

Hi Robin,

This sounds like a potential bug in the online compiler. Unfortunately, providing you with the offline compiler for this driver will be unlikely to solve your problem, as the compiler used is common to both.

I’ve managed to compile your shader without any problems using an offline compiler for an old 1.3 driver. If you can tell me the particular driver version you are using on your Beagle I should be able to look into this further.

Thanks for your prompt reply, Joe.

The driver i use is

BTW, where can i get the offline compiler? So that i can test if it works with the binary shaders.

I’ve just tried compiling your shader code with the offline compiler for driver

Unfortunately, I encountered the same bug, so providing you with the offline compiler will not help you with this issue.

Strangely, this bug only seems to be limited to this particular driver build and I did not have the same problem with earlier ( and later ( compilers.

If you need this functionality, the only options I can think of it to highlight this issue with TI and request newer drivers, or roll back to an earlier version of the drivers where this bug is not present (FYI, I managed to compile your shader with compiler as well).

Hope this helps,