summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/xa
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2014-06-21 12:42:03 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2014-06-30 22:27:11 +0100
commit37e640a073f8cd103bb4add7c82579d426a6982b (patch)
treec7945c35dc66dda140011f43d1cf1130715f14c9 /src/gallium/state_trackers/xa
parentc60a4ba7e36f069d6829948ee14d87970f5f39a1 (diff)
downloadexternal_mesa3d-37e640a073f8cd103bb4add7c82579d426a6982b.zip
external_mesa3d-37e640a073f8cd103bb4add7c82579d426a6982b.tar.gz
external_mesa3d-37e640a073f8cd103bb4add7c82579d426a6982b.tar.bz2
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 <jakob@vmware.com> Cc: Rob Clark <robclark@freedesktop.org> Cc: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'src/gallium/state_trackers/xa')
-rw-r--r--src/gallium/state_trackers/xa/Makefile.am11
-rw-r--r--src/gallium/state_trackers/xa/xa_tracker.c8
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 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);
}