<div dir="ltr"><div><div><div><div><div><div><div>Hi All,<br></div>I'm trying to run OpenCL with Mesa 10.1.<br></div>But can't create device when initialize.<br><br></div>The issue happens in pipe_loader_drm_x_auth(int fd) inside mesa-10.1/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c<br>
<br></div>The code is like this:<br>   /* Try authenticate with the X server to give us access to devices that X<br>    * is running on. */<br>   xcb_connection_t *xcb_conn;<br>   const xcb_setup_t *xcb_setup;<br>   xcb_screen_iterator_t s;<br>
   xcb_dri2_connect_cookie_t connect_cookie;<br>   xcb_dri2_connect_reply_t *connect;<br>   drm_magic_t magic;<br>   xcb_dri2_authenticate_cookie_t authenticate_cookie;<br>   xcb_dri2_authenticate_reply_t *authenticate;<br>
<br>   xcb_conn = xcb_connect(NULL,  NULL);<br><br>   if(!xcb_conn)<br>      return;<br><br>   xcb_setup = xcb_get_setup(xcb_conn);<br><br>  if (!xcb_setup)<br>    goto disconnect;<br><br>   s = xcb_setup_roots_iterator(xcb_setup);<br>
   connect_cookie = xcb_dri2_connect_unchecked(xcb_conn, s.data->root,<br>                                               XCB_DRI2_DRIVER_TYPE_DRI);<br>   connect = xcb_dri2_connect_reply(xcb_conn, connect_cookie, NULL);<br>
<br>   if (!connect || connect->driver_name_length<br>                   + connect->device_name_length == 0) {<br><br>      goto disconnect;<br>   }<br><br></div>The connect returned from xcb_dri2_connect_reply is 0x0.<br>
</div><br></div><div>I also tried to use xcb_generate_id to get a xcb_window_t.<br></div><div>And call xcb_dri2_connect instead of xcb_dri2_connect_unchecked.<br></div><div>Then send xcb_generic_error_t ** to xcb_dri2_connect_reply.<br>
</div><div>But the error is 0x0 too.<br><br></div><div>So I can't know what happened in xcb_dri2_connect_reply.<br></div><div>Is there any way to get the error information?<br><br></div><div><br></div><div>thanks<br></div>
<div>lixiang<br></div><div><br></div><br></div>