struct xa_tracker *xa = calloc(1, sizeof(struct xa_tracker));
enum xa_surface_type stype;
unsigned int num_formats;
- int loader_fd;
if (!xa)
return NULL;
-#if GALLIUM_STATIC_TARGETS
- xa->screen = dd_create_screen(drm_fd);
- (void) loader_fd; /* silence unused var warning */
-#else
- loader_fd = dup(drm_fd);
- if (loader_fd == -1)
- return NULL;
- if (pipe_loader_drm_probe_fd(&xa->dev, loader_fd))
+ if (pipe_loader_drm_probe_fd(&xa->dev, dup(drm_fd)))
xa->screen = pipe_loader_create_screen(xa->dev);
-#endif
+
if (!xa->screen)
goto out_no_screen;
out_no_pipe:
xa->screen->destroy(xa->screen);
out_no_screen:
-#if !GALLIUM_STATIC_TARGETS
if (xa->dev)
pipe_loader_release(&xa->dev, 1);
-#endif
free(xa);
return NULL;
}
free(xa->supported_formats);
xa_context_destroy(xa->default_ctx);
xa->screen->destroy(xa->screen);
-#if !GALLIUM_STATIC_TARGETS
pipe_loader_release(&xa->dev, 1);
-#endif
free(xa);
}
TARGET_DRIVERS =
TARGET_CPPFLAGS =
-TARGET_LIB_DEPS = $(top_builddir)/src/loader/libloader.la
+TARGET_LIB_DEPS =
include $(top_srcdir)/src/gallium/drivers/i915/Automake.inc
libxatracker_la_SOURCES += target.c
libxatracker_la_CPPFLAGS = $(TARGET_CPPFLAGS)
-libxatracker_la_LIBADD += $(TARGET_LIB_DEPS)
+libxatracker_la_LIBADD += \
+ $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_static.la \
+ $(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
+ $(TARGET_LIB_DEPS)
else # HAVE_GALLIUM_STATIC_TARGETS