summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/auxiliary/vl/vl_winsys_dri.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary/vl/vl_winsys_dri.c')
-rw-r--r--lib/mesa/src/gallium/auxiliary/vl/vl_winsys_dri.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/vl/vl_winsys_dri.c b/lib/mesa/src/gallium/auxiliary/vl/vl_winsys_dri.c
index 043483b7f..9ecc216b9 100644
--- a/lib/mesa/src/gallium/auxiliary/vl/vl_winsys_dri.c
+++ b/lib/mesa/src/gallium/auxiliary/vl/vl_winsys_dri.c
@@ -46,7 +46,7 @@
#include "state_tracker/drm_driver.h"
#include "util/u_memory.h"
-#include "util/crc32.h"
+#include "util/u_hash.h"
#include "util/u_hash_table.h"
#include "util/u_inlines.h"
@@ -326,7 +326,6 @@ vl_dri2_screen_create(Display *display, int screen)
xcb_dri2_authenticate_cookie_t authenticate_cookie;
xcb_dri2_authenticate_reply_t *authenticate = NULL;
xcb_screen_iterator_t s;
- xcb_screen_t *xcb_screen;
xcb_generic_error_t *error = NULL;
char *device_name;
int fd, device_name_length;
@@ -358,11 +357,9 @@ vl_dri2_screen_create(Display *display, int screen)
goto free_query;
s = xcb_setup_roots_iterator(xcb_get_setup(scrn->conn));
- xcb_screen = get_xcb_screen(s, screen);
- if (!xcb_screen)
- goto free_query;
driverType = XCB_DRI2_DRIVER_TYPE_DRI;
+#ifdef DRI2DriverPrimeShift
{
char *prime = getenv("DRI_PRIME");
if (prime) {
@@ -374,9 +371,10 @@ vl_dri2_screen_create(Display *display, int screen)
((primeid & DRI2DriverPrimeMask) << DRI2DriverPrimeShift);
}
}
+#endif
connect_cookie = xcb_dri2_connect_unchecked(scrn->conn,
- xcb_screen->root,
+ get_xcb_screen(s, screen)->root,
driverType);
connect = xcb_dri2_connect_reply(scrn->conn, connect_cookie, NULL);
if (connect == NULL ||
@@ -398,7 +396,7 @@ vl_dri2_screen_create(Display *display, int screen)
goto close_fd;
authenticate_cookie = xcb_dri2_authenticate_unchecked(scrn->conn,
- xcb_screen->root,
+ get_xcb_screen(s, screen)->root,
magic);
authenticate = xcb_dri2_authenticate_reply(scrn->conn, authenticate_cookie, NULL);
@@ -406,7 +404,7 @@ vl_dri2_screen_create(Display *display, int screen)
goto free_authenticate;
if (pipe_loader_drm_probe_fd(&scrn->base.dev, fd))
- scrn->base.pscreen = pipe_loader_create_screen(scrn->base.dev, 0);
+ scrn->base.pscreen = pipe_loader_create_screen(scrn->base.dev);
if (!scrn->base.pscreen)
goto release_pipe;