summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-10-15 00:43:52 +0100
committerEmil Velikov <[email protected]>2015-11-21 12:52:20 +0000
commit611ef64ed5ddb3c8bd95c2e0dc2f0959218bf516 (patch)
tree0ac3ffefff0959d0d7a4a292bdb78e2edf3c8414
parent1eb6e8a23cc29081105336dc2a1cbf6bb4c2603d (diff)
{st,targets}/xa: use static/dynamic pipe-loader
Analogous to previous commits. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
-rw-r--r--src/gallium/state_trackers/xa/Makefile.am5
-rw-r--r--src/gallium/state_trackers/xa/xa_tracker.c16
-rw-r--r--src/gallium/targets/xa/Makefile.am7
-rw-r--r--src/gallium/targets/xa/target.c2
4 files changed, 8 insertions, 22 deletions
diff --git a/src/gallium/state_trackers/xa/Makefile.am b/src/gallium/state_trackers/xa/Makefile.am
index 0d50c27253b..968778f995c 100644
--- a/src/gallium/state_trackers/xa/Makefile.am
+++ b/src/gallium/state_trackers/xa/Makefile.am
@@ -28,11 +28,6 @@ AM_CFLAGS = \
$(GALLIUM_CFLAGS) \
$(VISIBILITY_CFLAGS)
-if HAVE_GALLIUM_STATIC_TARGETS
-AM_CPPFLAGS = \
- -DGALLIUM_STATIC_TARGETS=1
-endif
-
xa_includedir = $(includedir)
xa_include_HEADERS = \
xa_composite.h \
diff --git a/src/gallium/state_trackers/xa/xa_tracker.c b/src/gallium/state_trackers/xa/xa_tracker.c
index 3011598e0d9..faa630c144b 100644
--- a/src/gallium/state_trackers/xa/xa_tracker.c
+++ b/src/gallium/state_trackers/xa/xa_tracker.c
@@ -152,21 +152,13 @@ xa_tracker_create(int drm_fd)
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;
@@ -214,10 +206,8 @@ 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;
}
@@ -228,9 +218,7 @@ 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);
}
diff --git a/src/gallium/targets/xa/Makefile.am b/src/gallium/targets/xa/Makefile.am
index 545d17eb4e1..a63fd6903a4 100644
--- a/src/gallium/targets/xa/Makefile.am
+++ b/src/gallium/targets/xa/Makefile.am
@@ -60,7 +60,7 @@ if HAVE_GALLIUM_STATIC_TARGETS
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
@@ -74,7 +74,10 @@ include $(top_srcdir)/src/gallium/drivers/freedreno/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
diff --git a/src/gallium/targets/xa/target.c b/src/gallium/targets/xa/target.c
index fde4a4a7dcf..42b1346d341 100644
--- a/src/gallium/targets/xa/target.c
+++ b/src/gallium/targets/xa/target.c
@@ -1 +1 @@
-#include "target-helpers/inline_drm_helper.h"
+#include "target-helpers/drm_helper.h"