Hi!
I'm trying to use GLX on i.MX6 but my program crashes (Segmentation fault) whenever i use glBindAttribLocation(). The bt looks like:
(gdb) bt
#0 __glChipBindAttributeLocation (gc=0x6e512008, programObject=0x328358,
index=0, name=0x9ab4 "posAttr")
at src/chip/make/../chip_glsh_compiler.c:2207
#1 0x76b26528 in __glim_BindAttribLocation (program=3, index=0,
name=0x9ab4 "posAttr")
at src/glcore/programmable/make/../gc_gl_shader.c:1604
#2 0x76e817d4 in glBindAttribLocation (program=3, index=0,
name=0x9ab4 "posAttr") at g_api_entry.c:2516
#3 0x00009748 in compileShaders () at main.c:210
#4 0x00009208 in main () at main.c:321
It is always crashing on this __glChipBindAttributeLocation and it is from vivante_dri.so. My example program works fine on my desktop Ubuntu (and as it is GLX the no changes should be required), and the OpenGL calls remaind the same as I used with EGL and GLES2 and they were also working well on i.MX6. glxgears are working fine, so the problem is with this glBindAttribLocation function. I've checked it with kernel 3.0.35 and 3.5.7 with soft float drivers and it gives me always the same result. Does anyone knows anything about it? Is there any way to make it work?
A Segmentation fault is generally an attempt to access memory that GPU can not access, I happends ofthen when wrong kernel version is used. Have you tried to use it with Yocto BSP?, I have verified that it includes the latest GPU drive.
To verify the opengles working on X.
1. Makesure the gpu-viv debian package installed to the root filesystem
2. Board, it wil boot up oneiric rootfs.
3. The UART console will be logged in as root
4. modprobe galcore
5. stop lightdm
6. startx $
Please try to run any samples available in GPU SDK from the freescale.com
I've checked with Yocto master (before and after gpu libraries to 3.10.9), on Ubuntu and my custom OS, and it always crashes whatever the combination of kernel and libraries is. The only way to get this working is to call glBindAttribLocation() after glLinkProgram() but it is the opposite order then described in OpenGL documentation. The glxgears are working fine, as they do not use shaders. So I consider this crash a bug in those libraries - to be more specific: in vivante_dri.so.