<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>&nbsp;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&nbsp; 2 17:31 i915_dri.so<br>-rwxr-xr-x 1 root root 13808225 Mar&nbsp; 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&nbsp;&nbsp; 65323 Mar&nbsp; 3 11:06 egl_dri2.so<br>-rwxr-xr-x 1 root root&nbsp;&nbsp; 41347 Mar&nbsp; 2 17:31 egl_glx.so<br>-rwxr-xr-x 1 root root 3223726 Mar&nbsp; 2 17:31 egl_x11_i915.so<br>-rwxr-xr-x 1 root root 4744002 Mar&nbsp; 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&nbsp;&nbsp;&nbsp; 4096 Mar&nbsp; 3 15:35 dri<br>drwxr-xr-x 2 root root&nbsp;&nbsp;&nbsp; 4096 Mar&nbsp; 3 11:06 egl<br>lrwxrwxrwx 1 root root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11 Mar&nbsp; 3 15:35 libEGL.so -&gt; libEGL.so.1<br>lrwxrwxrwx 1 root root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13 Mar&nbsp; 3 15:35 libEGL.so.1 -&gt; libEGL.so.1.0<br>-rwxr-xr-x 1 root root&nbsp; 240824 Mar&nbsp; 3 15:35 libEGL.so.1.0<br>lrwxrwxrwx 1 root root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 17 Mar&nbsp; 3 15:35 libGLESv1_CM.so -&gt;
 libGLESv1_CM.so.1<br>lrwxrwxrwx 1 root root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 21 Mar&nbsp; 3 15:35 libGLESv1_CM.so.1 -&gt; libGLESv1_CM.so.1.1.0<br>-rwxr-xr-x 1 root root 9914669 Mar&nbsp; 2 17:31 libGLESv1_CM.so.1.1.0<br>lrwxrwxrwx 1 root root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 14 Mar&nbsp; 3 15:35 libGLESv2.so -&gt; libGLESv2.so.2<br>lrwxrwxrwx 1 root root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18 Mar&nbsp; 3 15:35 libGLESv2.so.2 -&gt; libGLESv2.so.2.0.0<br>-rwxr-xr-x 1 root root 9721044 Mar&nbsp; 2 17:31 libGLESv2.so.2.0.0<br>lrwxrwxrwx 1 root root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10 Mar&nbsp; 3 15:35 libGL.so -&gt; libGL.so.1<br>lrwxrwxrwx 1 root root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12 Mar&nbsp; 3 15:35 libGL.so.1 -&gt; libGL.so.1.2<br>-rwxr-xr-x 1 root root 1799639 Mar&nbsp; 2 17:31 libGL.so.1.2<br>lrwxrwxrwx 1 root root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11 Mar&nbsp; 3 15:35 libGLU.so -&gt; libGLU.so.1<br>lrwxrwxrwx 1 root root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20 Mar&nbsp; 3
 15:35 libGLU.so.1 -&gt; libGLU.so.1.3.070802<br>-rwxr-xr-x 1 root root 1653469 Mar&nbsp; 2 17:31 libGLU.so.1.3.070802<br>drwxr-xr-x 2 root root&nbsp;&nbsp;&nbsp; 4096 Mar&nbsp; 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>&nbsp;&nbsp; { __DRI2_FLUSH, 1, offsetof(struct dri2_egl_display, flush) },<br>&nbsp;&nbsp; { __DRI_TEX_BUFFER, 2, offsetof(struct dri2_egl_display, tex_buffer) },<br>&nbsp;&nbsp; { NULL },<br>&nbsp;&nbsp; { __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>
&nbsp;&nbsp; { __DRI2_FLUSH, 1, offsetof(struct dri2_egl_display, flush) },<br>
&nbsp;&nbsp; { __DRI_TEX_BUFFER, 2, offsetof(struct dri2_egl_display, tex_buffer) },<br>&nbsp;&nbsp; { __DRI_IMAGE, 1, offsetof(struct dri2_egl_display, image) },<br>
&nbsp;&nbsp; { NULL }&nbsp;&nbsp; <br>
};<br>I changed this after seeing the below structure in the file dri_screen.c<br>static const __DRIextension *dri_screen_extensions[] = {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;driReadDrawableExtension,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;driCopySubBufferExtension.base,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;driSwapControlExtension.base,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;driFrameTrackingExtension.base,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;driMediaStreamCounterExtension.base,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;dri2TexBufferExtension.base,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;dri2FlushExtension.base,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NULL<br>&nbsp;&nbsp; };<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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EGL_RED_SIZE, 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EGL_GREEN_SIZE, 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EGL_BLUE_SIZE, 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EGL_DEPTH_SIZE, 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EGL_NONE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<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>