[Dri-users] xcb_dri2_connect_reply returns 0x0
stan li
ranma.eater at gmail.com
Wed Apr 2 16:32:36 PDT 2014
Hi All,
I'm trying to run OpenCL with Mesa 10.1.
But can't create device when initialize.
The issue happens in pipe_loader_drm_x_auth(int fd) inside
mesa-10.1/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
The code is like this:
/* Try authenticate with the X server to give us access to devices that X
* is running on. */
xcb_connection_t *xcb_conn;
const xcb_setup_t *xcb_setup;
xcb_screen_iterator_t s;
xcb_dri2_connect_cookie_t connect_cookie;
xcb_dri2_connect_reply_t *connect;
drm_magic_t magic;
xcb_dri2_authenticate_cookie_t authenticate_cookie;
xcb_dri2_authenticate_reply_t *authenticate;
xcb_conn = xcb_connect(NULL, NULL);
if(!xcb_conn)
return;
xcb_setup = xcb_get_setup(xcb_conn);
if (!xcb_setup)
goto disconnect;
s = xcb_setup_roots_iterator(xcb_setup);
connect_cookie = xcb_dri2_connect_unchecked(xcb_conn, s.data->root,
XCB_DRI2_DRIVER_TYPE_DRI);
connect = xcb_dri2_connect_reply(xcb_conn, connect_cookie, NULL);
if (!connect || connect->driver_name_length
+ connect->device_name_length == 0) {
goto disconnect;
}
The connect returned from xcb_dri2_connect_reply is 0x0.
I also tried to use xcb_generate_id to get a xcb_window_t.
And call xcb_dri2_connect instead of xcb_dri2_connect_unchecked.
Then send xcb_generic_error_t ** to xcb_dri2_connect_reply.
But the error is 0x0 too.
So I can't know what happened in xcb_dri2_connect_reply.
Is there any way to get the error information?
thanks
lixiang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-users/attachments/20140402/997de530/attachment.html>
More information about the dri-users
mailing list