From 37e640a073f8cd103bb4add7c82579d426a6982b Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Sat, 21 Jun 2014 12:42:03 +0100 Subject: targets/xa: provide alternative(static) xa target Now we can build the xa target (libxatracker) with either static pipe-drivers or shared ones. Currently we default to static. - Remove the unused CFLAGS/CPPFLAGS. - Use GALLIUM_TARGET_CFLAGS where applicable. v2: Update the printout messages at configure. v3: Drop inclusion of the wrapper winsys and softpipe/llvmpipe. Cc: Jakob Bornecrantz Cc: Rob Clark Cc: Thomas Hellstrom Signed-off-by: Emil Velikov --- src/gallium/state_trackers/xa/Makefile.am | 11 ++++++----- src/gallium/state_trackers/xa/xa_tracker.c | 8 ++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'src/gallium/state_trackers/xa') diff --git a/src/gallium/state_trackers/xa/Makefile.am b/src/gallium/state_trackers/xa/Makefile.am index 72486b9..52d84a9 100644 --- a/src/gallium/state_trackers/xa/Makefile.am +++ b/src/gallium/state_trackers/xa/Makefile.am @@ -30,11 +30,12 @@ AM_CFLAGS = \ AM_CPPFLAGS = \ $(GALLIUM_PIPE_LOADER_DEFINES) \ - -DPIPE_SEARCH_DIR=\"$(libdir)/gallium-pipe\" \ - -I$(top_srcdir)/src/gallium/targets/xa \ - -I$(top_srcdir)/src/gallium/ \ - -I$(top_srcdir)/src/gallium/winsys \ - -I$(top_srcdir)/src/gallium/drivers + -DPIPE_SEARCH_DIR=\"$(libdir)/gallium-pipe\" + +if HAVE_GALLIUM_STATIC_TARGETS +AM_CPPFLAGS += \ + -DGALLIUM_STATIC_TARGETS=1 +endif xa_includedir = $(includedir) xa_include_HEADERS = \ diff --git a/src/gallium/state_trackers/xa/xa_tracker.c b/src/gallium/state_trackers/xa/xa_tracker.c index 9add584..6e4312e 100644 --- a/src/gallium/state_trackers/xa/xa_tracker.c +++ b/src/gallium/state_trackers/xa/xa_tracker.c @@ -144,8 +144,12 @@ xa_tracker_create(int drm_fd) if (!xa) return NULL; +#if GALLIUM_STATIC_TARGETS + xa->screen = dd_create_screen(drm_fd); +#else if (pipe_loader_drm_probe_fd(&xa->dev, drm_fd, false)) xa->screen = pipe_loader_create_screen(xa->dev, PIPE_SEARCH_DIR); +#endif if (!xa->screen) goto out_no_screen; @@ -192,8 +196,10 @@ xa_tracker_create(int drm_fd) 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; } @@ -204,7 +210,9 @@ xa_tracker_destroy(struct xa_tracker *xa) 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); } -- cgit v1.1