xcb_dri2_connect_reply returns 0x0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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


_______________________________________________
dri-users mailing list
dri-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-users

[Index of Archives]     [Linux DRI Development]     [Linux Intel Graphics]     [Linux AMD Graphics]     [Video for Linux]     [Linux Audio Users]     [Yosemite Waterfalls]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux Media]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux