summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers')
-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 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);
}