loader/dri3: check xfixes version in loader_dri3_open()

this will allow simplifying some code without losing functionality

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30128>
This commit is contained in:
Mike Blumenkrantz
2024-07-11 08:57:48 -04:00
committed by Marge Bot
parent fa541a887c
commit c24891e044

View File

@@ -1311,6 +1311,10 @@ loader_dri3_open(xcb_connection_t *conn,
XCB_XFIXES_MAJOR_VERSION,
XCB_XFIXES_MINOR_VERSION);
fixes_reply = xcb_xfixes_query_version_reply(conn, fixes_cookie, NULL);
if (fixes_reply->major_version < 2) {
close(fd);
fd = -1;
}
free(fixes_reply);
return fd;