0

I'm having a problem compiling my "working" shader on an Android Device that uses OpenGL ES 3.0.

My shader works fine on a device that natively uses OpenGL ES 2.0 (it was written targeting that version). I'm trying to run my shader "undedited" on a device that uses OpenGL ES 3.0 and it doesn't compile. I'm using GLES20.glCompileShader to compile the source, but the code never returns from that function. I have another shader that was written for OpenGL ES 2.0 also, and it seems to work. For reasons of NDA, I can't show any code for the shader, but I can say that I'm using varying variables, uniforms, and a special extension "#extension GL_OES_EGL_image_external : require". But the shader that does work, also uses this extension, so that can't be the issue.

The real problem is not even a crash. I can't make it past GLES20.glCompileShader(...). It just hangs when using the "broken" shader. I'm not sure why. Thanks in advance for any answers.

pBlack
  • 102
  • 2
  • 10
  • 1
    File a bug with the device/GPU vendor. `glCompileShader` never completing clearly looks like a bug in the shader compiler, no matter how your shader code looks. – Reto Koradi May 04 '14 at 21:08
  • Usually, vendors also provide offline compilation tools for shaders. You can try that and load the binary in your program directly. Any case as Reto Koradi mentioned, it should not hang. How long is this "hang" - In the order of minutes ? What device is this ? – Prabindh May 04 '14 at 23:42
  • I can suggest to trim shader code line by line to narrow down problematic part of code which causes OpenGL driver to stall, then find a workaround for that part. Anyways this is driver issue and you need to contact manufacturer. – keaukraine May 05 '14 at 08:48

0 Answers0