diff options
author | Emil Velikov <[email protected]> | 2014-06-21 12:42:03 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-06-30 22:27:11 +0100 |
commit | 37e640a073f8cd103bb4add7c82579d426a6982b (patch) | |
tree | c7945c35dc66dda140011f43d1cf1130715f14c9 /src/gallium/state_trackers | |
parent | c60a4ba7e36f069d6829948ee14d87970f5f39a1 (diff) |
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 <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Thomas Hellstrom <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/xa/Makefile.am | 11 | ||||
-rw-r--r-- | src/gallium/state_trackers/xa/xa_tracker.c | 8 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/xa/Makefile.am b/src/gallium/state_trackers/xa/Makefile.am index 72486b9816c..52d84a9ab48 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 9add5843c73..6e4312e0079 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); } |