summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--src/gallium/SConscript2
-rw-r--r--src/gallium/state_trackers/dri/drm/SConscript2
-rw-r--r--src/gallium/targets/Makefile.am6
-rw-r--r--src/gallium/targets/dri-vmwgfx/Makefile.am51
-rw-r--r--src/gallium/targets/dri-vmwgfx/target.c52
-rw-r--r--src/gallium/targets/dri-vmwgfx/vmw_powf.c17
-rw-r--r--src/gallium/targets/dri/Makefile.am8
-rw-r--r--src/gallium/targets/dri/SConscript (renamed from src/gallium/targets/dri-vmwgfx/SConscript)8
9 files changed, 19 insertions, 130 deletions
diff --git a/configure.ac b/configure.ac
index 9e5efcbfd8f..4646212be8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1919,7 +1919,7 @@ if test -n "$with_gallium_drivers"; then
HAVE_GALLIUM_SVGA=yes
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga softpipe"
gallium_require_drm_loader
- gallium_check_st "svga/drm" "dri-vmwgfx" "xa/vmwgfx"
+ gallium_check_st "svga/drm" "dri/vmwgfx" "xa/vmwgfx"
;;
xi915)
HAVE_GALLIUM_I915=yes
@@ -2209,7 +2209,6 @@ AC_CONFIG_FILES([Makefile
src/gallium/state_trackers/xvmc/Makefile
src/gallium/targets/Makefile
src/gallium/targets/dri-swrast/Makefile
- src/gallium/targets/dri-vmwgfx/Makefile
src/gallium/targets/dri/Makefile
src/gallium/targets/egl-static/Makefile
src/gallium/targets/gbm/Makefile
diff --git a/src/gallium/SConscript b/src/gallium/SConscript
index 598b2f1ecb9..df71b9aeada 100644
--- a/src/gallium/SConscript
+++ b/src/gallium/SConscript
@@ -108,7 +108,7 @@ if not env['embedded']:
if env['dri']:
SConscript([
'targets/dri-swrast/SConscript',
- 'targets/dri-vmwgfx/SConscript',
+ 'targets/dri/SConscript',
])
diff --git a/src/gallium/state_trackers/dri/drm/SConscript b/src/gallium/state_trackers/dri/drm/SConscript
index 258f7eed702..761603942c3 100644
--- a/src/gallium/state_trackers/dri/drm/SConscript
+++ b/src/gallium/state_trackers/dri/drm/SConscript
@@ -15,7 +15,7 @@ env.Append(CPPPATH = [
xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
])
-env.Append(CPPDEFINES = [('SPLIT_TARGETS', '1')])
+env.Append(CPPDEFINES = [('GALLIUM_STATIC_TARGETS', '1')])
st_dri = env.ConvenienceLibrary(
target = 'st_dri',
diff --git a/src/gallium/targets/Makefile.am b/src/gallium/targets/Makefile.am
index 3e5d8e736d3..5e0ecc34a77 100644
--- a/src/gallium/targets/Makefile.am
+++ b/src/gallium/targets/Makefile.am
@@ -58,12 +58,6 @@ if HAVE_CLOVER
SUBDIRS += opencl
endif
-if HAVE_GALLIUM_SVGA
-if HAVE_DRI2
-SUBDIRS += dri-vmwgfx
-endif
-endif
-
if HAVE_GALLIUM_SOFTPIPE
if HAVE_DRISW
SUBDIRS += dri-swrast
diff --git a/src/gallium/targets/dri-vmwgfx/Makefile.am b/src/gallium/targets/dri-vmwgfx/Makefile.am
deleted file mode 100644
index 58a36306be8..00000000000
--- a/src/gallium/targets/dri-vmwgfx/Makefile.am
+++ /dev/null
@@ -1,51 +0,0 @@
-# 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 = \
- $(GALLIUM_DRI_CFLAGS)
-AM_CPPFLAGS = \
- -DGALLIUM_RBUG \
- -DGALLIUM_TRACE
-
-dridir = $(DRI_DRIVER_INSTALL_DIR)
-dri_LTLIBRARIES = vmwgfx_dri.la
-
-nodist_EXTRA_vmwgfx_dri_la_SOURCES = dummy.cpp
-vmwgfx_dri_la_SOURCES = \
- target.c \
- vmw_powf.c
-
-vmwgfx_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
-
-vmwgfx_dri_la_LIBADD = \
- $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
- $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
- $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
- $(top_builddir)/src/gallium/winsys/sw/wrapper/libwsw.la \
- $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
- $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
- $(top_builddir)/src/gallium/drivers/svga/libsvga.la \
- $(GALLIUM_DRI_LIB_DEPS)
-
-include $(top_srcdir)/install-gallium-links.mk
diff --git a/src/gallium/targets/dri-vmwgfx/target.c b/src/gallium/targets/dri-vmwgfx/target.c
deleted file mode 100644
index e3fbda1d665..00000000000
--- a/src/gallium/targets/dri-vmwgfx/target.c
+++ /dev/null
@@ -1,52 +0,0 @@
-
-#include "target-helpers/inline_wrapper_sw_helper.h"
-#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 = sw_screen_wrap(screen);
-
- screen = debug_screen_wrap(screen);
-
- return screen;
-}
-
-static const struct drm_conf_ret throttle_ret = {
- .type = DRM_CONF_INT,
- .val.val_int = 2,
-};
-
-static const struct drm_conf_ret share_fd_ret = {
- .type = DRM_CONF_BOOL,
- .val.val_int = true,
-};
-
-static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
-{
- switch (conf) {
- case DRM_CONF_THROTTLE:
- return &throttle_ret;
- case DRM_CONF_SHARE_FD:
- return &share_fd_ret;
- default:
- break;
- }
- return NULL;
-}
-
-DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen, drm_configuration)
diff --git a/src/gallium/targets/dri-vmwgfx/vmw_powf.c b/src/gallium/targets/dri-vmwgfx/vmw_powf.c
deleted file mode 100644
index ca5e39b389a..00000000000
--- a/src/gallium/targets/dri-vmwgfx/vmw_powf.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Powf may leave an unresolved symbol pointing to a libstdc++.so powf.
- * However, not all libstdc++.so include this function, so optionally
- * replace the powf function with calls to expf and logf.
- */
-
-#ifdef VMW_RESOLVE_POWF
-
-extern float expf(float x);
-extern float logf(float x);
-extern float powf(float x, float y);
-
-float powf(float x, float y) {
- return expf(logf(x)*y);
-}
-
-#endif
diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index 613b798c393..2c100ff3d7a 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -111,6 +111,14 @@ STATIC_TARGET_LIB_DEPS += \
$(RADEON_LIBS)
endif
+if HAVE_GALLIUM_SVGA
+MEGADRIVERS += vmwgfx
+STATIC_TARGET_CPPFLAGS += -DGALLIUM_VMWGFX
+STATIC_TARGET_LIB_DEPS += \
+ $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
+ $(top_builddir)/src/gallium/drivers/svga/libsvga.la
+endif
+
if HAVE_GALLIUM_FREEDRENO
MEGADRIVERS += freedreno
STATIC_TARGET_CPPFLAGS += -DGALLIUM_FREEDRENO
diff --git a/src/gallium/targets/dri-vmwgfx/SConscript b/src/gallium/targets/dri/SConscript
index 0d19944f5c0..9908b519fdb 100644
--- a/src/gallium/targets/dri-vmwgfx/SConscript
+++ b/src/gallium/targets/dri/SConscript
@@ -6,6 +6,10 @@ if env['suncc']:
print 'warning: not building dri-vmwgfx'
Return()
+env.Append(CPPPATH = [
+ '#/src/loader',
+])
+
if env['build'] == 'release':
env.Append(CPPDEFINES = ['GALLIUM_RBUG'])
env.Prepend(LIBS = [rbug])
@@ -13,11 +17,15 @@ else:
env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG', 'GALLIUM_GALAHAD', 'GALLIUM_SOFTPIPE'])
env.Prepend(LIBS = [trace, rbug, galahad, softpipe, ws_wrapper])
+env.Append(CPPDEFINES = [
+ 'GALLIUM_VMWGFX',
+])
env.Prepend(LIBS = [
st_dri,
svgadrm,
svga,
+ libloader,
mesa,
glsl,
gallium,