[Mesa-dev] [PATCH] vulkan/wsi/x11: add support to detect if we can support rendering

Dave Airlie airlied at gmail.com
Sun Feb 19 22:18:03 UTC 2017


> @@ -270,6 +318,25 @@ VkBool32
> wsi_get_physical_device_xcb_presentation_support(
>        return false;
>     }
>
> +   xcb_screen_iterator_t screen_iter =
> +      xcb_setup_roots_iterator(xcb_get_setup(connection));
> +   xcb_screen_t *screen = screen_iter.data;
> +
> +   char *local_dev = drmGetRenderDeviceNameFromFd(fd);
> +   int dri3_fd = x11_get_dri3_fd(connection, screen);
> +   if (dri3_fd != -1) {
> +      char *dri3_dev = drmGetRenderDeviceNameFromFd(dri3_fd);
>
>
> What exactly does this return?  Is it just the render node path?  I have no
> idea if this is the right way to compare two DRM devices or not.

This is the right way according to me :-), since dri3 can give you back a card
or render node you need to map to the rendernode get it's name and compare it.

I've fixed the other bits. (v2 coming up)

btw doesn't appear as if the Sascha Willems demo call this :-)

Dave.


More information about the mesa-dev mailing list