tools/intel-virtual-output: Use xcb_dri3_id

xcb exports the extension structs for querying whether they exist and
sharing the results.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2015-02-25 14:29:03 +00:00
parent 6bf6b4b750
commit 2b978c71e4
1 changed files with 1 additions and 2 deletions

View File

@ -387,11 +387,10 @@ static int dri3_query_version(Display *dpy, int *major, int *minor)
static int dri3_exists(Display *dpy)
{
xcb_extension_t dri3 = { "DRI3", 0 };
const xcb_query_extension_reply_t *ext;
int major, minor;
ext = xcb_get_extension_data(XGetXCBConnection(dpy), &dri3);
ext = xcb_get_extension_data(XGetXCBConnection(dpy), &xcb_dri3_id);
if (ext == NULL || !ext->present)
return 0;