This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why wont this fragment shader compile on Mali T-604?

I'm trying to get OpenGL ES hardware acceleration set up on my Samsung ARM Chromebook running Linux. I followed the instructions on the Mali Developer page to get the Mali driver installed by maybe I did something wrong.

When I try to run es2tri from the Mesa demos I get the following error:

root@localhost:~/gles2# ./es2tri 
[PLUGIN INFO] Plugin initializing
[PLUGIN DEBUG]  './override.instr_config' not found, trying to open the process config file
[PLUGIN DEBUG]  './es2tri.instr_config' not found, trying to open the default config file
[PLUGIN ERROR] Couldn't open default config file './default.instr_config'.
[PLUGIN INFO] No configuration file found, attempting to use environment
[PLUGIN INFO] CINSTR GENERAL: Output directory set to: . 
[PLUGIN INFO] No instrumentation features requested.
EGL_VERSION = 1.4 Midgard-"r3p0-02rel0"
EGL_VENDOR = ARM
EGL_EXTENSIONS = EGL_KHR_config_attribs EGL_KHR_image EGL_KHR_image_base EGL_KHR_fence_sync EGL_KHR_wait_sync EGL_ARM_pixmap_multisample_discard EGL_KHR_gl_texture_2D_image EGL_KHR_gl_renderbuffer_image EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_KHR_gl_texture_cubemap_image EGL_KHR_image_pixmap
EGL_CLIENT_APIS = OpenGL_ES
Error: fragment shader did not compile!

The fragment shader program:

  static const char *fragShaderText =
      "varying vec4 v_color;\n"
      "void main() {\n"
      "   gl_FragColor = v_color;\n"
      "}\n";

How it's being used:

 GLuint fragShader, vertShader, program;
   GLint stat;


   fragShader = glCreateShader(GL_FRAGMENT_SHADER);
   glShaderSource(fragShader, 1, (const char **) &fragShaderText, NULL);
   glCompileShader(fragShader);
   glGetShaderiv(fragShader, GL_COMPILE_STATUS, &stat);
   if (!stat) {
      printf("Error: fragment shader did not compile!\n");
      exit(1);
   }

When I run the application using the Mesa GLES drivers, everything works. When I run linking to the Mali drivers, there's that error. Other Mesa demo applications es2gears run ok and much faster on Mali than the Mesa drivers.

You can see the full es2tri.c source code here:

mesa/demos - A collection of OpenGL / Mesa demos and test programs.

Hopefully I provided enough information for people to help me understand what's wrong. Sorry if this isn't the right place for this question. Thanks.