summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-02-10 10:43:11 -0500
committerRob Clark <[email protected]>2014-02-16 08:36:19 -0500
commit42158926c6d7d3ddbe61b9a04d60544ff1b50a96 (patch)
tree13a31743d343a5f31684bbf836d1e4b088e2fe25 /src/gallium/targets
parenta122c75599cf196b7997fbc5ec2854ebd65af408 (diff)
st/xa: use pipe-loader to get screen
This lets multiple gallium drivers use XA. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/targets')
-rw-r--r--src/gallium/targets/Makefile.am8
-rw-r--r--src/gallium/targets/xa-vmwgfx/vmw_target.c26
-rw-r--r--src/gallium/targets/xa/Makefile.am (renamed from src/gallium/targets/xa-vmwgfx/Makefile.am)46
-rw-r--r--src/gallium/targets/xa/xatracker.pc.in (renamed from src/gallium/targets/xa-vmwgfx/xatracker.pc.in)0
4 files changed, 30 insertions, 50 deletions
diff --git a/src/gallium/targets/Makefile.am b/src/gallium/targets/Makefile.am
index a3369140844..871b31d9512 100644
--- a/src/gallium/targets/Makefile.am
+++ b/src/gallium/targets/Makefile.am
@@ -34,6 +34,10 @@ if HAVE_GALLIUM_GBM
SUBDIRS += gbm
endif
+if HAVE_ST_XA
+SUBDIRS += xa
+endif
+
if HAVE_CLOVER
SUBDIRS += opencl
endif
@@ -42,10 +46,6 @@ if HAVE_GALLIUM_SVGA
if HAVE_DRI
SUBDIRS += dri-vmwgfx
endif
-
-if HAVE_ST_XA
-SUBDIRS += xa-vmwgfx
-endif
endif
if HAVE_GALLIUM_FREEDRENO
diff --git a/src/gallium/targets/xa-vmwgfx/vmw_target.c b/src/gallium/targets/xa-vmwgfx/vmw_target.c
deleted file mode 100644
index 1087801ef78..00000000000
--- a/src/gallium/targets/xa-vmwgfx/vmw_target.c
+++ /dev/null
@@ -1,26 +0,0 @@
-
-#include "target-helpers/inline_debug_helper.h"
-#include "state_tracker/drm_driver.h"
-#include "svga/drm/svga_drm_public.h"
-#include "svga/svga_public.h"
-
-static struct pipe_screen *
-create_screen(int fd)
-{
- struct svga_winsys_screen *sws;
- struct pipe_screen *screen;
-
- sws = svga_drm_winsys_screen_create(fd);
- if (!sws)
- return NULL;
-
- screen = svga_screen_create(sws);
- if (!screen)
- return NULL;
-
- screen = debug_screen_wrap(screen);
-
- return screen;
-}
-
-DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen, NULL)
diff --git a/src/gallium/targets/xa-vmwgfx/Makefile.am b/src/gallium/targets/xa/Makefile.am
index 6fe0510bf42..e305dbfdc13 100644
--- a/src/gallium/targets/xa-vmwgfx/Makefile.am
+++ b/src/gallium/targets/xa/Makefile.am
@@ -22,40 +22,46 @@
include $(top_srcdir)/src/gallium/Automake.inc
-AM_CFLAGS = \
- -Wall -pedantic \
- $(GALLIUM_CFLAGS) \
- $(XORG_CFLAGS)
AM_CPPFLAGS = \
- -I$(top_srcdir)/src/gallium/drivers \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src/gallium/state_trackers/xa \
-I$(top_srcdir)/src/gallium/winsys
+AM_CFLAGS = \
+ $(GALLIUM_CFLAGS) \
+ $(LIBUDEV_CFLAGS) \
+ $(LIBDRM_CFLAGS)
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xatracker.pc
lib_LTLIBRARIES = libxatracker.la
-libxatracker_la_SOURCES = vmw_target.c
-
-libxatracker_la_LDFLAGS = -version-number $(XA_MAJOR):$(XA_MINOR):$(XA_TINY)
+libxatracker_la_SOURCES =
libxatracker_la_LIBADD = \
- $(top_builddir)/src/gallium/auxiliary/libgallium.la \
+ $(GALLIUM_PIPE_LOADER_LIBS) \
+ $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader.la \
+ $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la \
$(top_builddir)/src/gallium/state_trackers/xa/libxatracker.la \
- $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
- $(top_builddir)/src/gallium/drivers/svga/libsvga.la \
- $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
- $(top_builddir)/src/gallium/drivers/rbug/librbug.la
+ $(top_builddir)/src/gallium/auxiliary/libgallium.la \
+ $(LIBUDEV_LIBS) \
+ $(LIBDRM_LIBS)
-nodist_EXTRA_libxatracker_la_SOURCES = dummy.cpp
+libxatracker_la_LDFLAGS = \
+ -no-undefined \
+ -version-number $(XA_MAJOR):$(XA_MINOR):$(XA_TINY)
+# FIXME: this shouldn't be needed
if HAVE_MESA_LLVM
-libxatracker_la_LDFLAGS += $(LLVM_LDFLAGS)
+# Mention a dummy pure C++ file to trigger generation of the $(LINK) variable
+nodist_EXTRA_libxatracker_la_SOURCES = dummy-cpp.cpp
+
libxatracker_la_LIBADD += $(LLVM_LIBS)
+libxatracker_la_LDFLAGS += $(LLVM_LDFLAGS)
+else
+# Mention a dummy pure C file to trigger generation of the $(LINK) variable
+nodist_EXTRA_libxatracker_la_SOURCES = dummy-c.c
endif
-# Provide compatibility with scripts for the old Mesa build system for
-# a while by putting a link to the driver into /lib of the build tree.
-all-local: libxatracker.la
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
- ln -f .libs/libxatracker.so* $(top_builddir)/$(LIB_DIR)/gallium/
+include $(top_srcdir)/install-lib-links.mk
diff --git a/src/gallium/targets/xa-vmwgfx/xatracker.pc.in b/src/gallium/targets/xa/xatracker.pc.in
index c99d8d65e88..c99d8d65e88 100644
--- a/src/gallium/targets/xa-vmwgfx/xatracker.pc.in
+++ b/src/gallium/targets/xa/xatracker.pc.in