<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Dear All,<br><br>Sorry for such a big mail, i just want to put in detailed.<br><br> I am trying for hardware acceleration on Mesa 7.8.2 on RHEL6 which has kernel version 2.6.32.<br>I compiled mesa with below configurations.<br>./configure --enable-gles2 --enable-egl --with-egl-platforms=drm --with-dri-drivers=i965 --disable-glw --with-state-trackers=egl,dri,es --enable-gallium-intel<br><br>it generated the below list of libraries<br>----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>[srini@RHEL2 ~]$ ls -l /usr/local/lib/dri/<br>total 25636<br>-rwxr-xr-x 1 root root 12435719 Mar 2 17:31 i915_dri.so<br>-rwxr-xr-x 1 root root 13808225 Mar 3
15:35 i965_dri.so<br><br>[srini@RHEL2 ~]$ ls -l /usr/local/lib/egl/<br>total 7896<br>-rwxr-xr-x 1 root root 65323 Mar 3 11:06 egl_dri2.so<br>-rwxr-xr-x 1 root root 41347 Mar 2 17:31 egl_glx.so<br>-rwxr-xr-x 1 root root 3223726 Mar 2 17:31 egl_x11_i915.so<br>-rwxr-xr-x 1 root root 4744002 Mar 2 21:24 egl_x11_i965.so<br><br>srini@RHEL2 ~]$ ls -l /usr/local/lib/<br>total 22804<br>drwxr-xr-x 2 root root 4096 Mar 3 15:35 dri<br>drwxr-xr-x 2 root root 4096 Mar 3 11:06 egl<br>lrwxrwxrwx 1 root root 11 Mar 3 15:35 libEGL.so -> libEGL.so.1<br>lrwxrwxrwx 1 root root 13 Mar 3 15:35 libEGL.so.1 -> libEGL.so.1.0<br>-rwxr-xr-x 1 root root 240824 Mar 3 15:35 libEGL.so.1.0<br>lrwxrwxrwx 1 root root 17 Mar 3 15:35 libGLESv1_CM.so ->
libGLESv1_CM.so.1<br>lrwxrwxrwx 1 root root 21 Mar 3 15:35 libGLESv1_CM.so.1 -> libGLESv1_CM.so.1.1.0<br>-rwxr-xr-x 1 root root 9914669 Mar 2 17:31 libGLESv1_CM.so.1.1.0<br>lrwxrwxrwx 1 root root 14 Mar 3 15:35 libGLESv2.so -> libGLESv2.so.2<br>lrwxrwxrwx 1 root root 18 Mar 3 15:35 libGLESv2.so.2 -> libGLESv2.so.2.0.0<br>-rwxr-xr-x 1 root root 9721044 Mar 2 17:31 libGLESv2.so.2.0.0<br>lrwxrwxrwx 1 root root 10 Mar 3 15:35 libGL.so -> libGL.so.1<br>lrwxrwxrwx 1 root root 12 Mar 3 15:35 libGL.so.1 -> libGL.so.1.2<br>-rwxr-xr-x 1 root root 1799639 Mar 2 17:31 libGL.so.1.2<br>lrwxrwxrwx 1 root root 11 Mar 3 15:35 libGLU.so -> libGLU.so.1<br>lrwxrwxrwx 1 root root 20 Mar 3
15:35 libGLU.so.1 -> libGLU.so.1.3.070802<br>-rwxr-xr-x 1 root root 1653469 Mar 2 17:31 libGLU.so.1.3.070802<br>drwxr-xr-x 2 root root 4096 Mar 3 15:35 pkgconfig<br>----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br><br>Runing my test application, i got below error<br>[srini@RHEL2 check_GLES]$ ./sphere <br>libEGL fatal: DRI2: did not find extension DRI_IMAGE version 1<br><br>then i changed few stuff in the file egl_dri2.c. the changes are this.<br><br>static struct dri2_extension_match dri2_core_extensions[] = {<br> { __DRI2_FLUSH, 1, offsetof(struct dri2_egl_display, flush) },<br> { __DRI_TEX_BUFFER, 2, offsetof(struct dri2_egl_display, tex_buffer) },<br> { NULL },<br> { __DRI_IMAGE, 1, offsetof(struct dri2_egl_display, image)
}<br>};<br>originally it was like this.<br>static struct dri2_extension_match dri2_core_extensions[] = {<br>
{ __DRI2_FLUSH, 1, offsetof(struct dri2_egl_display, flush) },<br>
{ __DRI_TEX_BUFFER, 2, offsetof(struct dri2_egl_display, tex_buffer) },<br> { __DRI_IMAGE, 1, offsetof(struct dri2_egl_display, image) },<br>
{ NULL } <br>
};<br>I changed this after seeing the below structure in the file dri_screen.c<br>static const __DRIextension *dri_screen_extensions[] = {<br> &driReadDrawableExtension,<br> &driCopySubBufferExtension.base,<br> &driSwapControlExtension.base,<br> &driFrameTrackingExtension.base,<br> &driMediaStreamCounterExtension.base,<br> &dri2TexBufferExtension.base,<br> &dri2FlushExtension.base,<br> NULL<br> };<br>which actually loads the dri_extension, doesn't have entry for image_extension. <br><br>with this change build,eglInitilization is successfull. which actually create the screen, configurations everything.<br><br>but the application when comming to eglChooseConfig(), it could not find
the matching EGL attributes. below is my attribute list my application is quering for.<br><br>static const EGLint attribs[] = {<br> EGL_RED_SIZE, 1,<br> EGL_GREEN_SIZE, 1,<br> EGL_BLUE_SIZE, 1,<br> EGL_DEPTH_SIZE, 1,<br> EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,<br> EGL_NONE<br> };<br>and i am endup with the
error.<br>-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>[srini@RHEL2 check_GLES]$ ./sphere <br>libEGL debug: dlopen(/usr/local/lib/egl/egl_dri2.so)<br>libEGL debug: DRI2: dlopen(/usr/local/lib/dri/i965_dri.so)<br>libEGL debug: DRI2: found extension `DRI_Core'<br>libEGL info: DRI2: found extension DRI_Core version 1<br>libEGL debug: DRI2: found extension `DRI_Legacy'<br>libEGL debug: DRI2: found extension `DRI_DRI2'<br>libEGL info: DRI2: found extension DRI_DRI2 version 1<br>libEGL debug: DRI2: found extension `DRI_ReadDrawable'<br>libEGL debug: DRI2: found extension `DRI_CopySubBuffer'<br>libEGL debug: DRI2: found extension `DRI_SwapControl'<br>libEGL debug: DRI2: found extension `DRI_FrameTracking'<br>libEGL debug: DRI2: found extension `DRI_MediaStreamCounter'<br>libEGL debug: DRI2: found extension
`DRI_TexBuffer'<br>libEGL info: DRI2: found extension DRI_TexBuffer version 2<br>libEGL debug: DRI2: found extension `DRI2_Flush'<br>libEGL info: DRI2: found extension DRI2_Flush version 3<br>Availble configuration for this attributes are 0<br>libEGL debug: EGL user error 0x3005 (EGL_BAD_CONFIG) in eglCreateWindowSurface<br><br>Error returned by eglCreateWindowSurface - error = 0x3005<br>[srini@RHEL2 check_GLES]$ <br>-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br><br>but this application working fine if i set EGL_DRIVER=/usr/local/lib/egl/egl_x11_i965.so<br><br>so, i seriously think it must be the bug from i965_dri2.so.<br><br>i am peeking in to the code as much as i do, and ends clueless.<br><br>please anyone confirm me where it is going wrong.<br><br>glade to give more details.<br><br>Thanking
you.<br>Srini.<br></div>
</div><br></body></html>