This lets multiple gallium drivers use XA.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
dnl
if test "x$enable_xa" = xyes; then
GALLIUM_STATE_TRACKERS_DIRS="xa $GALLIUM_STATE_TRACKERS_DIRS"
+ enable_gallium_loader=yes
fi
AM_CONDITIONAL(HAVE_ST_XA, test "x$enable_xa" = xyes)
xsvga)
HAVE_GALLIUM_SVGA=yes
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga softpipe"
- gallium_check_st "svga/drm" "dri-vmwgfx" "xa-vmwgfx"
+ gallium_check_st "svga/drm" "dri-vmwgfx" ""
;;
xi915)
HAVE_GALLIUM_I915=yes
AC_SUBST([XVMC_MINOR], 0)
AC_SUBST([XA_MAJOR], 2)
-AC_SUBST([XA_MINOR], 1)
+AC_SUBST([XA_MINOR], 2)
AC_SUBST([XA_TINY], 0)
AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_TINY")
src/gallium/targets/egl-static/Makefile
src/gallium/targets/gbm/Makefile
src/gallium/targets/opencl/Makefile
+ src/gallium/targets/xa/Makefile
+ src/gallium/targets/xa/xatracker.pc
src/gallium/targets/osmesa/Makefile
src/gallium/targets/osmesa/osmesa.pc
src/gallium/targets/pipe-loader/Makefile
src/gallium/targets/r600/xvmc/Makefile
src/gallium/targets/libgl-xlib/Makefile
src/gallium/targets/vdpau-nouveau/Makefile
- src/gallium/targets/xa-vmwgfx/Makefile
- src/gallium/targets/xa-vmwgfx/xatracker.pc
src/gallium/targets/xvmc-nouveau/Makefile
src/gallium/tests/trivial/Makefile
src/gallium/tests/unit/Makefile
$(VISIBILITY_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
unsigned int format_map[XA_LAST_SURFACE_TYPE][2];
int d_depth_bits_last;
int ds_depth_bits_last;
+ struct pipe_loader_device *dev;
struct pipe_screen *screen;
struct xa_context *default_ctx;
};
#include "xa_priv.h"
#include "pipe/p_state.h"
#include "pipe/p_format.h"
+#include "pipe-loader/pipe_loader.h"
#include "state_tracker/drm_driver.h"
#include "util/u_inlines.h"
if (!xa)
return NULL;
- xa->screen = driver_descriptor.create_screen(drm_fd);
+ if (pipe_loader_drm_probe_fd(&xa->dev, drm_fd, false))
+ xa->screen = pipe_loader_create_screen(xa->dev, PIPE_SEARCH_DIR);
if (!xa->screen)
goto out_no_screen;
out_no_pipe:
xa->screen->destroy(xa->screen);
out_no_screen:
+ if (xa->dev)
+ pipe_loader_release(&xa->dev, 1);
free(xa);
return NULL;
}
free(xa->supported_formats);
xa_context_destroy(xa->default_ctx);
xa->screen->destroy(xa->screen);
+ pipe_loader_release(&xa->dev, 1);
free(xa);
}
SUBDIRS += gbm
endif
+if HAVE_ST_XA
+SUBDIRS += xa
+endif
+
if HAVE_CLOVER
SUBDIRS += opencl
endif
if HAVE_DRI
SUBDIRS += dri-vmwgfx
endif
-
-if HAVE_ST_XA
-SUBDIRS += xa-vmwgfx
-endif
endif
if HAVE_GALLIUM_FREEDRENO
+++ /dev/null
-# Copyright © 2012 Intel Corporation
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-
-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)/src/gallium/winsys
-
-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_LIBADD = \
- $(top_builddir)/src/gallium/auxiliary/libgallium.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
-
-nodist_EXTRA_libxatracker_la_SOURCES = dummy.cpp
-
-if HAVE_MESA_LLVM
-libxatracker_la_LDFLAGS += $(LLVM_LDFLAGS)
-libxatracker_la_LIBADD += $(LLVM_LIBS)
-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/
+++ /dev/null
-
-#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)
+++ /dev/null
-prefix=@prefix@
-exec_prefix=${prefix}
-libdir=@libdir@
-includedir=@includedir@
-
-Name: xatracker
-Description: Xorg Gallium3D acceleration library
-Version: @XA_VERSION@
-Libs: -L${libdir} -lxatracker
--- /dev/null
+# Copyright © 2012 Intel Corporation
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+include $(top_srcdir)/src/gallium/Automake.inc
+
+AM_CPPFLAGS = \
+ -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 =
+
+libxatracker_la_LIBADD = \
+ $(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/auxiliary/libgallium.la \
+ $(LIBUDEV_LIBS) \
+ $(LIBDRM_LIBS)
+
+libxatracker_la_LDFLAGS = \
+ -no-undefined \
+ -version-number $(XA_MAJOR):$(XA_MINOR):$(XA_TINY)
+
+# FIXME: this shouldn't be needed
+if HAVE_MESA_LLVM
+# 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
+
+include $(top_srcdir)/install-lib-links.mk
--- /dev/null
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=@includedir@
+
+Name: xatracker
+Description: Xorg Gallium3D acceleration library
+Version: @XA_VERSION@
+Libs: -L${libdir} -lxatracker