[Mesa-dev] [PATCH 13/13] targets/dri: create pipe-loader driver library frontend
Emil Velikov
emil.l.velikov at gmail.com
Mon Feb 10 20:26:33 PST 2014
XXX: some more work needed ^_^
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
configure.ac | 12 +--
src/gallium/state_trackers/dri/common/dri_screen.c | 6 +-
src/gallium/state_trackers/dri/common/dri_screen.h | 2 +
src/gallium/state_trackers/dri/drm/Makefile.am | 2 +
src/gallium/state_trackers/dri/drm/dri2.c | 15 +++-
src/gallium/state_trackers/dri/sw/Makefile.am | 3 +
src/gallium/state_trackers/dri/sw/drisw.c | 16 +++-
src/gallium/targets/Makefile.am | 35 +--------
src/gallium/targets/dri-freedreno/Makefile.am | 71 -----------------
src/gallium/targets/dri-freedreno/target-kgsl.c | 20 -----
src/gallium/targets/dri-freedreno/target-msm.c | 20 -----
src/gallium/targets/dri-i915/Makefile.am | 66 ----------------
src/gallium/targets/dri-i915/target.c | 29 -------
src/gallium/targets/dri-ilo/Makefile.am | 67 ----------------
src/gallium/targets/dri-ilo/target.c | 44 -----------
src/gallium/targets/dri-nouveau/Makefile.am | 61 ---------------
src/gallium/targets/dri-nouveau/target.c | 36 ---------
src/gallium/targets/dri-swrast/Makefile.am | 69 -----------------
src/gallium/targets/dri-swrast/swrast_drm_api.c | 65 ----------------
src/gallium/targets/dri-vmwgfx/Makefile.am | 65 ----------------
src/gallium/targets/dri-vmwgfx/target.c | 52 -------------
src/gallium/targets/dri-vmwgfx/vmw_powf.c | 17 -----
src/gallium/targets/dri/Makefile.am | 89 ++++++++++++++++++++++
src/gallium/targets/pipe-loader/Makefile.am | 13 +++-
src/gallium/targets/pipe-loader/pipe.link | 6 +-
src/gallium/targets/r300/dri/Makefile.am | 63 ---------------
src/gallium/targets/r600/dri/Makefile.am | 65 ----------------
src/gallium/targets/radeonsi/dri/Makefile.am | 63 ---------------
src/mesa/drivers/dri/common/xmlconfig.c | 18 +++++
29 files changed, 165 insertions(+), 925 deletions(-)
delete mode 100644 src/gallium/targets/dri-freedreno/Makefile.am
delete mode 100644 src/gallium/targets/dri-freedreno/target-kgsl.c
delete mode 100644 src/gallium/targets/dri-freedreno/target-msm.c
delete mode 100644 src/gallium/targets/dri-i915/Makefile.am
delete mode 100644 src/gallium/targets/dri-i915/target.c
delete mode 100644 src/gallium/targets/dri-ilo/Makefile.am
delete mode 100644 src/gallium/targets/dri-ilo/target.c
delete mode 100644 src/gallium/targets/dri-nouveau/Makefile.am
delete mode 100644 src/gallium/targets/dri-nouveau/target.c
delete mode 100644 src/gallium/targets/dri-swrast/Makefile.am
delete mode 100644 src/gallium/targets/dri-swrast/swrast_drm_api.c
delete mode 100644 src/gallium/targets/dri-vmwgfx/Makefile.am
delete mode 100644 src/gallium/targets/dri-vmwgfx/target.c
delete mode 100644 src/gallium/targets/dri-vmwgfx/vmw_powf.c
create mode 100644 src/gallium/targets/dri/Makefile.am
delete mode 100644 src/gallium/targets/r300/dri/Makefile.am
delete mode 100644 src/gallium/targets/r600/dri/Makefile.am
delete mode 100644 src/gallium/targets/radeonsi/dri/Makefile.am
diff --git a/configure.ac b/configure.ac
index 1b3def9..bb33e56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -755,6 +755,7 @@ esac
if test "x$enable_dri" = xyes; then
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/dri"
GALLIUM_STATE_TRACKERS_DIRS="dri $GALLIUM_STATE_TRACKERS_DIRS"
+ enable_gallium_loader=yes
fi
if test "x$enable_gallium_osmesa" = xyes; then
@@ -2041,22 +2042,13 @@ AC_CONFIG_FILES([Makefile
src/gallium/state_trackers/xa/Makefile
src/gallium/state_trackers/xvmc/Makefile
src/gallium/targets/Makefile
- src/gallium/targets/dri-freedreno/Makefile
- src/gallium/targets/dri-i915/Makefile
- src/gallium/targets/dri-ilo/Makefile
- src/gallium/targets/dri-nouveau/Makefile
- src/gallium/targets/dri-swrast/Makefile
- src/gallium/targets/dri-vmwgfx/Makefile
- src/gallium/targets/egl-static/Makefile
+ src/gallium/targets/dri/Makefile
src/gallium/targets/gbm/Makefile
src/gallium/targets/opencl/Makefile
src/gallium/targets/osmesa/Makefile
src/gallium/targets/osmesa/osmesa.pc
src/gallium/targets/pipe-loader/Makefile
- src/gallium/targets/radeonsi/dri/Makefile
src/gallium/targets/radeonsi/omx/Makefile
- src/gallium/targets/r300/dri/Makefile
- src/gallium/targets/r600/dri/Makefile
src/gallium/targets/r600/omx/Makefile
src/gallium/targets/r600/xvmc/Makefile
src/gallium/targets/libgl-xlib/Makefile
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
index 7a6dcb2..23968a6 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.c
+++ b/src/gallium/state_trackers/dri/common/dri_screen.c
@@ -37,6 +37,7 @@
#include "util/u_inlines.h"
#include "pipe/p_screen.h"
#include "pipe/p_format.h"
+#include "pipe-loader/pipe_loader.h"
#include "state_tracker/st_gl_api.h" /* for st_gl_api_create */
#include "state_tracker/drm_driver.h"
@@ -387,6 +388,7 @@ dri_destroy_screen(__DRIscreen * sPriv)
dri_destroy_screen_helper(screen);
+ pipe_loader_release(&screen->dev, 1);
free(screen);
sPriv->driverPrivate = NULL;
sPriv->extensions = NULL;
@@ -426,12 +428,12 @@ dri_init_screen_helper(struct dri_screen *screen,
screen->target = PIPE_TEXTURE_RECT;
driParseOptionInfo(&screen->optionCacheDefaults, gallium_config_options.xml);
-
+/*
driParseConfigFiles(&screen->optionCache,
&screen->optionCacheDefaults,
screen->sPriv->myNum,
driver_descriptor.name);
-
+*/
/* Handle force_s3tc_enable. */
if (!util_format_s3tc_enabled &&
driQueryOptionb(&screen->optionCache, "force_s3tc_enable")) {
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.h b/src/gallium/state_trackers/dri/common/dri_screen.h
index f263a90..dc9a851 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.h
+++ b/src/gallium/state_trackers/dri/common/dri_screen.h
@@ -70,6 +70,8 @@ struct dri_screen
/* drm */
int fd;
+ struct pipe_loader_device *dev;
+
/* gallium */
boolean d_depth_bits_last;
boolean sd_depth_bits_last;
diff --git a/src/gallium/state_trackers/dri/drm/Makefile.am b/src/gallium/state_trackers/dri/drm/Makefile.am
index f41f45d..f44792c 100644
--- a/src/gallium/state_trackers/dri/drm/Makefile.am
+++ b/src/gallium/state_trackers/dri/drm/Makefile.am
@@ -24,6 +24,8 @@ include Makefile.sources
include $(top_srcdir)/src/gallium/Automake.inc
AM_CPPFLAGS = \
+ $(GALLIUM_PIPE_LOADER_DEFINES) \
+ -DPIPE_SEARCH_DIR=\"$(libdir)/gallium-pipe\" \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/mapi \
-I$(top_srcdir)/src/mesa \
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index 0589644..518cf93 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -33,6 +33,7 @@
#include "util/u_inlines.h"
#include "util/u_format.h"
#include "util/u_debug.h"
+#include "pipe-loader/pipe_loader.h"
#include "state_tracker/drm_driver.h"
#include "state_tracker/st_texture.h"
#include "state_tracker/st_context.h"
@@ -1029,7 +1030,7 @@ dri2_init_screen(__DRIscreen * sPriv)
{
const __DRIconfig **configs;
struct dri_screen *screen;
- struct pipe_screen *pscreen;
+ struct pipe_screen *pscreen = NULL;
const struct drm_conf_ret *throttle_ret = NULL;
const struct drm_conf_ret *dmabuf_ret = NULL;
@@ -1042,12 +1043,17 @@ dri2_init_screen(__DRIscreen * sPriv)
sPriv->driverPrivate = (void *)screen;
- pscreen = driver_descriptor.create_screen(screen->fd);
+ if (pipe_loader_drm_probe_fd(&screen->dev, screen->fd))
+ pscreen = pipe_loader_create_screen(screen->dev, PIPE_SEARCH_DIR);
+
+ if (!pscreen)
+ goto no_screen;
+/*
if (driver_descriptor.configuration) {
throttle_ret = driver_descriptor.configuration(DRM_CONF_THROTTLE);
dmabuf_ret = driver_descriptor.configuration(DRM_CONF_SHARE_FD);
}
-
+*/
if (throttle_ret && throttle_ret->val.val_int != -1) {
screen->throttling_enabled = TRUE;
screen->default_throttle_frames = throttle_ret->val.val_int;
@@ -1081,6 +1087,9 @@ dri2_init_screen(__DRIscreen * sPriv)
return configs;
fail:
dri_destroy_screen_helper(screen);
+no_screen:
+ if (screen->dev)
+ pipe_loader_release(&screen->dev, 1);
FREE(screen);
return NULL;
}
diff --git a/src/gallium/state_trackers/dri/sw/Makefile.am b/src/gallium/state_trackers/dri/sw/Makefile.am
index 555ea17..3b301b7 100644
--- a/src/gallium/state_trackers/dri/sw/Makefile.am
+++ b/src/gallium/state_trackers/dri/sw/Makefile.am
@@ -24,6 +24,8 @@ include Makefile.sources
include $(top_srcdir)/src/gallium/Automake.inc
AM_CPPFLAGS = \
+ $(GALLIUM_PIPE_LOADER_DEFINES) \
+ -DPIPE_SEARCH_DIR=\"$(libdir)/gallium-pipe\" \
-I$(top_srcdir)/src/mapi \
-I$(top_srcdir)/src/mesa \
-I$(top_srcdir)/src/gallium/state_trackers/dri/common \
@@ -37,3 +39,4 @@ AM_CPPFLAGS = \
noinst_LTLIBRARIES = libdrisw.la
libdrisw_la_SOURCES = $(C_SOURCES)
+
diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c
index 6f50b05..dd0677d 100644
--- a/src/gallium/state_trackers/dri/sw/drisw.c
+++ b/src/gallium/state_trackers/dri/sw/drisw.c
@@ -39,8 +39,11 @@
#include "util/u_inlines.h"
#include "util/u_box.h"
#include "pipe/p_context.h"
+#include "pipe-loader/pipe_loader.h"
#include "state_tracker/drisw_api.h"
#include "state_tracker/st_context.h"
+#include "state_tracker/sw_winsys.h"
+#include "../winsys/sw/dri/dri_sw_winsys.h"
#include "dri_screen.h"
#include "dri_context.h"
@@ -344,7 +347,7 @@ drisw_init_screen(__DRIscreen * sPriv)
{
const __DRIconfig **configs;
struct dri_screen *screen;
- struct pipe_screen *pscreen;
+ struct pipe_screen *pscreen = NULL;
screen = CALLOC_STRUCT(dri_screen);
if (!screen)
@@ -358,9 +361,13 @@ drisw_init_screen(__DRIscreen * sPriv)
sPriv->driverPrivate = (void *)screen;
sPriv->extensions = drisw_screen_extensions;
- pscreen = drisw_create_screen(&drisw_lf);
- /* dri_init_screen_helper checks pscreen for us */
+ if (pipe_loader_sw_probe_dri(&screen->dev, &drisw_lf))
+ pscreen = pipe_loader_create_screen(screen->dev, PIPE_SEARCH_DIR);
+
+ if (!pscreen)
+ goto no_screen;
+ /* dri_init_screen_helper checks pscreen for us */
configs = dri_init_screen_helper(screen, pscreen);
if (!configs)
goto fail;
@@ -368,6 +375,9 @@ drisw_init_screen(__DRIscreen * sPriv)
return configs;
fail:
dri_destroy_screen_helper(screen);
+no_screen:
+ if (screen->dev)
+ pipe_loader_release(&screen->dev, 1);
FREE(screen);
return NULL;
}
diff --git a/src/gallium/targets/Makefile.am b/src/gallium/targets/Makefile.am
index 0f79a2e..38ee626 100644
--- a/src/gallium/targets/Makefile.am
+++ b/src/gallium/targets/Makefile.am
@@ -30,6 +30,10 @@ if HAVE_GALLIUM_OSMESA
SUBDIRS += osmesa
endif
+if HAVE_DRI
+SUBDIRS += dri
+endif
+
if HAVE_GALLIUM_GBM
SUBDIRS += gbm
endif
@@ -43,44 +47,24 @@ SUBDIRS += vdpau
endif
if HAVE_GALLIUM_SVGA
-if HAVE_DRI
-SUBDIRS += dri-vmwgfx
-endif
-
if HAVE_ST_XA
SUBDIRS += xa-vmwgfx
endif
endif
if HAVE_GALLIUM_FREEDRENO
-if HAVE_DRI
-SUBDIRS += dri-freedreno
-endif
endif
if HAVE_GALLIUM_I915
-if HAVE_DRI
-SUBDIRS += dri-i915
-endif
endif
if HAVE_GALLIUM_ILO
-if HAVE_DRI
-SUBDIRS += dri-ilo
-endif
endif
if HAVE_GALLIUM_R300
-if HAVE_DRI
-SUBDIRS += r300/dri
-endif
endif
if HAVE_GALLIUM_R600
-if HAVE_DRI
-SUBDIRS += r600/dri
-endif
-
if HAVE_ST_XVMC
SUBDIRS += r600/xvmc
endif
@@ -91,29 +75,18 @@ endif
endif
if HAVE_GALLIUM_RADEONSI
-if HAVE_DRI
-SUBDIRS += radeonsi/dri
-endif
-
if HAVE_ST_OMX
SUBDIRS += radeonsi/omx
endif
endif
if HAVE_GALLIUM_NOUVEAU
-if HAVE_DRI
-SUBDIRS += dri-nouveau
-endif
-
if HAVE_ST_XVMC
SUBDIRS += xvmc-nouveau
endif
endif
if HAVE_GALLIUM_SOFTPIPE
-if HAVE_DRI
-SUBDIRS += dri-swrast
-endif
endif
if NEED_GALLIUM_LOADER
diff --git a/src/gallium/targets/dri-freedreno/Makefile.am b/src/gallium/targets/dri-freedreno/Makefile.am
deleted file mode 100644
index 94500b0..0000000
--- a/src/gallium/targets/dri-freedreno/Makefile.am
+++ /dev/null
@@ -1,71 +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 \
- -DGALLIUM_NOOP
-
-dridir = $(DRI_DRIVER_INSTALL_DIR)
-dri_LTLIBRARIES = kgsl_dri.la msm_dri.la
-
-COMMON_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
-
-COMMON_LIBADD = \
- $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
- $(top_builddir)/src/mesa/libmesagallium.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
- $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
- $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
- $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
- $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
- $(top_builddir)/src/gallium/drivers/noop/libnoop.la \
- $(GALLIUM_DRI_LIB_DEPS) \
- $(LIBDRM_LIBS) \
- $(FREEDRENO_LIBS)
-
-if HAVE_MESA_LLVM
-COMMON_LDFLAGS += $(LLVM_LDFLAGS)
-COMMON_LIBADD += $(LLVM_LIBS)
-endif
-
-nodist_EXTRA_kgsl_dri_la_SOURCES = dummy.cpp
-kgsl_dri_la_SOURCES = target-kgsl.c
-kgsl_dri_la_LDFLAGS = $(COMMON_LDFLAGS)
-kgsl_dri_la_LIBADD = $(COMMON_LIBADD)
-
-nodist_EXTRA_msm_dri_la_SOURCES = dummy.cpp
-msm_dri_la_SOURCES = target-msm.c
-msm_dri_la_LDFLAGS = $(COMMON_LDFLAGS)
-msm_dri_la_LIBADD = $(COMMON_LIBADD)
-
-# 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: kgsl_dri.la msm_dri.la
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
- ln -f .libs/kgsl_dri.so $(top_builddir)/$(LIB_DIR)/gallium/kgsl_dri.so
- ln -f .libs/msm_dri.so $(top_builddir)/$(LIB_DIR)/gallium/msm_dri.so
diff --git a/src/gallium/targets/dri-freedreno/target-kgsl.c b/src/gallium/targets/dri-freedreno/target-kgsl.c
deleted file mode 100644
index dcaf299..0000000
--- a/src/gallium/targets/dri-freedreno/target-kgsl.c
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#include "target-helpers/inline_debug_helper.h"
-#include "state_tracker/drm_driver.h"
-#include "freedreno/drm/freedreno_drm_public.h"
-
-static struct pipe_screen *
-create_screen(int fd)
-{
- struct pipe_screen *screen;
-
- screen = fd_drm_screen_create(fd);
- if (!screen)
- return NULL;
-
- screen = debug_screen_wrap(screen);
-
- return screen;
-}
-
-DRM_DRIVER_DESCRIPTOR("freedreno", "kgsl", create_screen, NULL)
diff --git a/src/gallium/targets/dri-freedreno/target-msm.c b/src/gallium/targets/dri-freedreno/target-msm.c
deleted file mode 100644
index 4a6299b..0000000
--- a/src/gallium/targets/dri-freedreno/target-msm.c
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#include "target-helpers/inline_debug_helper.h"
-#include "state_tracker/drm_driver.h"
-#include "freedreno/drm/freedreno_drm_public.h"
-
-static struct pipe_screen *
-create_screen(int fd)
-{
- struct pipe_screen *screen;
-
- screen = fd_drm_screen_create(fd);
- if (!screen)
- return NULL;
-
- screen = debug_screen_wrap(screen);
-
- return screen;
-}
-
-DRM_DRIVER_DESCRIPTOR("freedreno", "msm", create_screen, NULL)
diff --git a/src/gallium/targets/dri-i915/Makefile.am b/src/gallium/targets/dri-i915/Makefile.am
deleted file mode 100644
index 3f8468f..0000000
--- a/src/gallium/targets/dri-i915/Makefile.am
+++ /dev/null
@@ -1,66 +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 \
- -DGALLIUM_GALAHAD \
- -DGALLIUM_SOFTPIPE
-
-dridir = $(DRI_DRIVER_INSTALL_DIR)
-dri_LTLIBRARIES = i915_dri.la
-
-i915_dri_la_SOURCES = target.c
-
-i915_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
-
-i915_dri_la_LIBADD = \
- $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
- $(top_builddir)/src/mesa/libmesagallium.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
- $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
- $(top_builddir)/src/gallium/winsys/sw/wrapper/libwsw.la \
- $(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la \
- $(top_builddir)/src/gallium/drivers/galahad/libgalahad.la \
- $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
- $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
- $(top_builddir)/src/gallium/drivers/i915/libi915.la \
- $(GALLIUM_DRI_LIB_DEPS) \
- $(INTEL_LIBS)
-
-nodist_EXTRA_i915_dri_la_SOURCES = dummy.cpp
-
-if HAVE_MESA_LLVM
-AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
-i915_dri_la_LIBADD += $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la $(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: i915_dri.la
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
- ln -f .libs/i915_dri.so $(top_builddir)/$(LIB_DIR)/gallium/i915_dri.so
diff --git a/src/gallium/targets/dri-i915/target.c b/src/gallium/targets/dri-i915/target.c
deleted file mode 100644
index 935eb0e..0000000
--- a/src/gallium/targets/dri-i915/target.c
+++ /dev/null
@@ -1,29 +0,0 @@
-
-#include "state_tracker/drm_driver.h"
-#include "target-helpers/inline_wrapper_sw_helper.h"
-#include "target-helpers/inline_debug_helper.h"
-#include "i915/drm/i915_drm_public.h"
-#include "i915/i915_public.h"
-
-static struct pipe_screen *
-create_screen(int fd)
-{
- struct i915_winsys *iws;
- struct pipe_screen *screen;
-
- iws = i915_drm_winsys_create(fd);
- if (!iws)
- return NULL;
-
- screen = i915_screen_create(iws);
- if (!screen)
- return NULL;
-
- screen = sw_screen_wrap(screen);
-
- screen = debug_screen_wrap(screen);
-
- return screen;
-}
-
-DRM_DRIVER_DESCRIPTOR("i915", "i915", create_screen, NULL)
diff --git a/src/gallium/targets/dri-ilo/Makefile.am b/src/gallium/targets/dri-ilo/Makefile.am
deleted file mode 100644
index 418e2ea..0000000
--- a/src/gallium/targets/dri-ilo/Makefile.am
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright © 2012 Intel Corporation
-# Copyright © 2013 LunarG, Inc.
-#
-# 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 \
- -DGALLIUM_GALAHAD
-
-noinst_LTLIBRARIES = ilo_dri.la
-
-ilo_dri_la_SOURCES = target.c
-
-# need -rpath to create a noinst shared library
-ilo_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS) \
- -rpath $(abs_builddir)
-
-ilo_dri_la_LIBADD = \
- $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
- $(top_builddir)/src/mesa/libmesagallium.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
- $(top_builddir)/src/gallium/winsys/intel/drm/libintelwinsys.la \
- $(top_builddir)/src/gallium/drivers/galahad/libgalahad.la \
- $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
- $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
- $(top_builddir)/src/gallium/drivers/ilo/libilo.la \
- $(GALLIUM_DRI_LIB_DEPS) \
- $(INTEL_LIBS)
-
-# Mention a dummy pure C++ file to trigger generation of the $(LINK) variable
-nodist_EXTRA_ilo_dri_la_SOURCES = dummy-cpp.cpp
-
-if HAVE_MESA_LLVM
-ilo_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
-ilo_dri_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: ilo_dri.la
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
- ln -f .libs/ilo_dri.so $(top_builddir)/$(LIB_DIR)/gallium/ilo_dri.so
- ln -sf ilo_dri.so $(top_builddir)/$(LIB_DIR)/gallium/i965_dri.so
diff --git a/src/gallium/targets/dri-ilo/target.c b/src/gallium/targets/dri-ilo/target.c
deleted file mode 100644
index 3ce75e9..0000000
--- a/src/gallium/targets/dri-ilo/target.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include "state_tracker/drm_driver.h"
-#include "target-helpers/inline_debug_helper.h"
-#include "intel/intel_winsys.h"
-#include "ilo/ilo_public.h"
-
-static struct pipe_screen *
-create_screen(int fd)
-{
- struct intel_winsys *iws;
- struct pipe_screen *screen;
-
- iws = intel_winsys_create_for_fd(fd);
- if (!iws)
- return NULL;
-
- screen = ilo_screen_create(iws);
- if (!screen) {
- intel_winsys_destroy(iws);
- return NULL;
- }
-
- screen = debug_screen_wrap(screen);
-
- return screen;
-}
-
-
-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_SHARE_FD:
- return &share_fd_ret;
- default:
- break;
- }
- return NULL;
-}
-
-DRM_DRIVER_DESCRIPTOR("i965", "i915", create_screen, drm_configuration)
diff --git a/src/gallium/targets/dri-nouveau/Makefile.am b/src/gallium/targets/dri-nouveau/Makefile.am
deleted file mode 100644
index 1988067..0000000
--- a/src/gallium/targets/dri-nouveau/Makefile.am
+++ /dev/null
@@ -1,61 +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 = nouveau_dri.la
-
-nodist_EXTRA_nouveau_dri_la_SOURCES = dummy.cpp
-nouveau_dri_la_SOURCES = target.c
-
-nouveau_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
-
-nouveau_dri_la_LIBADD = \
- $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
- $(top_builddir)/src/mesa/libmesagallium.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
- $(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
- $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
- $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
- $(top_builddir)/src/gallium/drivers/nouveau/libnouveau.la \
- $(GALLIUM_DRI_LIB_DEPS) \
- $(LIBDRM_LIBS) \
- $(NOUVEAU_LIBS)
-
-if HAVE_MESA_LLVM
-nouveau_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
-nouveau_dri_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: nouveau_dri.la
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
- ln -f .libs/nouveau_dri.so $(top_builddir)/$(LIB_DIR)/gallium/nouveau_dri.so
diff --git a/src/gallium/targets/dri-nouveau/target.c b/src/gallium/targets/dri-nouveau/target.c
deleted file mode 100644
index f0fcdd8..0000000
--- a/src/gallium/targets/dri-nouveau/target.c
+++ /dev/null
@@ -1,36 +0,0 @@
-
-#include "target-helpers/inline_debug_helper.h"
-#include "state_tracker/drm_driver.h"
-#include "nouveau/drm/nouveau_drm_public.h"
-
-static struct pipe_screen *
-create_screen(int fd)
-{
- struct pipe_screen *screen;
-
- screen = nouveau_drm_screen_create(fd);
- if (!screen)
- return NULL;
-
- screen = debug_screen_wrap(screen);
-
- return screen;
-}
-
-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_SHARE_FD:
- return &share_fd_ret;
- default:
- break;
- }
- return NULL;
-}
-
-DRM_DRIVER_DESCRIPTOR("nouveau", "nouveau", create_screen, drm_configuration)
diff --git a/src/gallium/targets/dri-swrast/Makefile.am b/src/gallium/targets/dri-swrast/Makefile.am
deleted file mode 100644
index ec1576b..0000000
--- a/src/gallium/targets/dri-swrast/Makefile.am
+++ /dev/null
@@ -1,69 +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 = \
- $(EXPAT_CFLAGS) \
- $(GALLIUM_DRI_CFLAGS)
-AM_CPPFLAGS = \
- -I$(top_srcdir)/src/gallium/winsys/sw/dri \
- -I$(top_builddir)/src/mesa/drivers/dri/common \
- -DGALLIUM_RBUG \
- -DGALLIUM_TRACE \
- -DGALLIUM_SOFTPIPE \
- -D__NOT_HAVE_DRM_H
-
-dridir = $(DRI_DRIVER_INSTALL_DIR)
-dri_LTLIBRARIES = swrast_dri.la
-
-swrast_dri_la_SOURCES = \
- swrast_drm_api.c \
- $(top_srcdir)/src/mesa/drivers/dri/common/utils.c \
- $(top_srcdir)/src/mesa/drivers/dri/common/dri_util.c \
- $(top_srcdir)/src/mesa/drivers/dri/common/xmlconfig.c
-
-swrast_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
-
-swrast_dri_la_LIBADD = \
- $(top_builddir)/src/mesa/libmesagallium.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(top_builddir)/src/gallium/state_trackers/dri/sw/libdrisw.la \
- $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la \
- $(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la \
- $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
- $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
- $(GALLIUM_DRI_LIB_DEPS)
-
-nodist_EXTRA_swrast_dri_la_SOURCES = dummy.cpp
-
-if HAVE_MESA_LLVM
-AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
-swrast_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
-swrast_dri_la_LIBADD += $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la $(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: swrast_dri.la
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
- ln -f .libs/swrast_dri.so $(top_builddir)/$(LIB_DIR)/gallium/swrast_dri.so
diff --git a/src/gallium/targets/dri-swrast/swrast_drm_api.c b/src/gallium/targets/dri-swrast/swrast_drm_api.c
deleted file mode 100644
index a8973fd..0000000
--- a/src/gallium/targets/dri-swrast/swrast_drm_api.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
- *
- * Copyright 2009, VMware, Inc.
- * All Rights Reserved.
- * Copyright 2010 George Sapountzis <gsapountzis at gmail.com>
- *
- * 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, sub license, 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 NON-INFRINGEMENT.
- * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS 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 "pipe/p_compiler.h"
-#include "util/u_memory.h"
-#include "dri_sw_winsys.h"
-
-#include "target-helpers/inline_debug_helper.h"
-#include "target-helpers/inline_sw_helper.h"
-
-#include "state_tracker/drm_driver.h"
-
-DRM_DRIVER_DESCRIPTOR("swrast", NULL, NULL, NULL);
-
-struct pipe_screen *
-drisw_create_screen(struct drisw_loader_funcs *lf)
-{
- struct sw_winsys *winsys = NULL;
- struct pipe_screen *screen = NULL;
-
- winsys = dri_create_sw_winsys(lf);
- if (winsys == NULL)
- return NULL;
-
- screen = sw_screen_create(winsys);
- if (!screen)
- goto fail;
-
- screen = debug_screen_wrap(screen);
-
- return screen;
-
-fail:
- if (winsys)
- winsys->destroy(winsys);
-
- return NULL;
-}
-
-/* vim: set sw=3 ts=8 sts=3 expandtab: */
diff --git a/src/gallium/targets/dri-vmwgfx/Makefile.am b/src/gallium/targets/dri-vmwgfx/Makefile.am
deleted file mode 100644
index 712e570..0000000
--- a/src/gallium/targets/dri-vmwgfx/Makefile.am
+++ /dev/null
@@ -1,65 +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
-
-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/mesa/libmesagallium.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.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)
-
-vmwgfx_dri_la_LINK = $(CXXLINK) $(vmwgfx_dri_la_LDFLAGS)
-# Mention a dummy pure C++ file to trigger generation of the $(LINK) variable
-nodist_EXTRA_vmwgfx_dri_la_SOURCES = dummy-cpp.cpp
-
-if HAVE_MESA_LLVM
-vmwgfx_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
-vmwgfx_dri_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: vmwgfx_dri.la
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
- ln -f .libs/vmwgfx_dri.so $(top_builddir)/$(LIB_DIR)/gallium/vmwgfx_dri.so
diff --git a/src/gallium/targets/dri-vmwgfx/target.c b/src/gallium/targets/dri-vmwgfx/target.c
deleted file mode 100644
index e3fbda1..0000000
--- 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 ca5e39b..0000000
--- 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
new file mode 100644
index 0000000..1b57308
--- /dev/null
+++ b/src/gallium/targets/dri/Makefile.am
@@ -0,0 +1,89 @@
+# Copyright 2014 Emil Velikov
+#
+# 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
+
+COMMON_CPPFLAGS = \
+ $(GALLIUM_PIPE_LOADER_DEFINES) \
+ -DPIPE_SEARCH_DIR=\"$(libdir)/gallium-pipe\" \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src/mapi \
+ -I$(top_srcdir)/src/mesa \
+ -I$(top_srcdir)/src/gallium/state_trackers/dri/common \
+ -I$(top_srcdir)/src/mesa/drivers/dri/common \
+ -I$(top_builddir)/src/mesa/drivers/dri/common \
+ $(GALLIUM_CFLAGS) \
+ $(LIBDRM_CFLAGS) \
+ $(VISIBILITY_CFLAGS)
+
+COMMON_LDFLAGS = \
+ -module \
+ -avoid-version \
+ -shared \
+ -Wl,-Bsymbolic
+
+COMMON_LIBADD = \
+ $(GALLIUM_PIPE_LOADER_LIBS) \
+ $(top_builddir)/src/mesa/libmesagallium.la \
+ $(top_builddir)/src/gallium/auxiliary/libgallium.la \
+ $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader.la \
+ $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la \
+ $(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
+ $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la \
+ $(GALLIUM_DRI_LIB_DEPS)
+
+
+lib_LTLIBRARIES = galliumdrm_dri.la galliumsw_dri.la
+
+galliumdrm_dri_la_CPPFLAGS = \
+ $(COMMON_CPPFLAGS)
+
+galliumdrm_dri_la_SOURCES =
+nodist_EXTRA_galliumdrm_dri_la_SOURCES = dummy.cpp
+
+galliumdrm_dri_la_LDFLAGS = \
+ $(COMMON_LDFLAGS)
+
+galliumdrm_dri_la_LIBADD = \
+ $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
+ $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
+ $(COMMON_LIBADD)
+
+
+
+galliumsw_dri_la_CPPFLAGS = \
+ $(COMMON_CPPFLAGS) \
+ -D__NOT_HAVE_DRM_H
+
+galliumsw_dri_la_SOURCES = \
+ $(top_srcdir)/src/mesa/drivers/dri/common/utils.c \
+ $(top_srcdir)/src/mesa/drivers/dri/common/dri_util.c \
+ $(top_srcdir)/src/mesa/drivers/dri/common/xmlconfig.c
+
+nodist_EXTRA_galliumsw_dri_la_SOURCES = dummy.cpp
+
+galliumsw_dri_la_LDFLAGS = \
+ $(COMMON_LDFLAGS)
+
+galliumsw_dri_la_LIBADD = \
+ $(top_builddir)/src/gallium/state_trackers/dri/sw/libdrisw.la \
+ $(COMMON_LIBADD)
diff --git a/src/gallium/targets/pipe-loader/Makefile.am b/src/gallium/targets/pipe-loader/Makefile.am
index cb2eff7..a1c48f0 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -29,7 +29,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/gallium/drivers \
-I$(top_srcdir)/src/gallium/winsys \
- $(LIBDRM_CFLAGS) \
+ $(LIBDRM_CFLAGS) \
-DGALLIUM_RBUG \
-DGALLIUM_TRACE \
-DGALLIUM_GALAHAD
@@ -152,12 +152,21 @@ endif
if HAVE_GALLIUM_SOFTPIPE
pipe_LTLIBRARIES += pipe_swrast.la
pipe_swrast_la_SOURCES = pipe_swrast.c
+pipe_swrast_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -DGALLIUM_SOFTPIPE
+
pipe_swrast_la_LIBADD = \
$(PIPE_LIBS) \
+ $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la \
$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module
-if HAVE_GALLIUM_LLVMPIPE
+
nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
+if HAVE_GALLIUM_LLVMPIPE
+pipe_swrast_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -DGALLIUM_LLVMPIPE
pipe_swrast_la_LIBADD += \
$(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la \
diff --git a/src/gallium/targets/pipe-loader/pipe.link b/src/gallium/targets/pipe-loader/pipe.link
index d6dd2af..83aa7b9 100644
--- a/src/gallium/targets/pipe-loader/pipe.link
+++ b/src/gallium/targets/pipe-loader/pipe.link
@@ -1,3 +1,7 @@
VERSION {
- global: driver_descriptor; local: *;
+ global:
+ driver_descriptor;
+ swrast_create_screen;
+ local:
+ *;
};
diff --git a/src/gallium/targets/r300/dri/Makefile.am b/src/gallium/targets/r300/dri/Makefile.am
deleted file mode 100644
index d6d8f2d..0000000
--- a/src/gallium/targets/r300/dri/Makefile.am
+++ /dev/null
@@ -1,63 +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 \
- -DGALLIUM_GALAHAD
-
-dridir = $(DRI_DRIVER_INSTALL_DIR)
-dri_LTLIBRARIES = r300_dri.la
-
-nodist_EXTRA_r300_dri_la_SOURCES = dummy.cpp
-r300_dri_la_SOURCES = \
- drm_target.c
-
-r300_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
-
-r300_dri_la_LIBADD = \
- $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
- $(top_builddir)/src/mesa/libmesagallium.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
- $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
- $(top_builddir)/src/gallium/drivers/galahad/libgalahad.la \
- $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
- $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
- $(top_builddir)/src/gallium/drivers/r300/libr300.la \
- $(GALLIUM_DRI_LIB_DEPS) \
- $(RADEON_LIBS)
-
-if HAVE_MESA_LLVM
-r300_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
-r300_dri_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: r300_dri.la
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
- ln -f .libs/r300_dri.so $(top_builddir)/$(LIB_DIR)/gallium/r300_dri.so
diff --git a/src/gallium/targets/r600/dri/Makefile.am b/src/gallium/targets/r600/dri/Makefile.am
deleted file mode 100644
index 42db72f..0000000
--- a/src/gallium/targets/r600/dri/Makefile.am
+++ /dev/null
@@ -1,65 +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 \
- -DGALLIUM_NOOP
-
-dridir = $(DRI_DRIVER_INSTALL_DIR)
-dri_LTLIBRARIES = r600_dri.la
-
-r600_dri_la_SOURCES = \
- drm_target.c
-
-r600_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
-
-r600_dri_la_LIBADD = \
- $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
- $(top_builddir)/src/mesa/libmesagallium.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(top_builddir)/src/gallium/drivers/r600/libr600.la \
- $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
- $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
- $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
- $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
- $(top_builddir)/src/gallium/drivers/noop/libnoop.la \
- $(GALLIUM_DRI_LIB_DEPS) \
- $(LIBDRM_LIBS) \
- $(RADEON_LIBS)
-
-nodist_EXTRA_r600_dri_la_SOURCES = dummy.cpp
-
-if HAVE_MESA_LLVM
-r600_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
-r600_dri_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: r600_dri.la
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
- ln -f .libs/r600_dri.so $(top_builddir)/$(LIB_DIR)/gallium/r600_dri.so
diff --git a/src/gallium/targets/radeonsi/dri/Makefile.am b/src/gallium/targets/radeonsi/dri/Makefile.am
deleted file mode 100644
index 2c1a58d..0000000
--- a/src/gallium/targets/radeonsi/dri/Makefile.am
+++ /dev/null
@@ -1,63 +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 \
- -DGALLIUM_NOOP
-
-dridir = $(DRI_DRIVER_INSTALL_DIR)
-dri_LTLIBRARIES = radeonsi_dri.la
-
-nodist_EXTRA_radeonsi_dri_la_SOURCES = dummy.cpp
-radeonsi_dri_la_SOURCES = \
- drm_target.c
-
-radeonsi_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
-
-radeonsi_dri_la_LIBADD = \
- $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
- $(top_builddir)/src/mesa/libmesagallium.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
- $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
- $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
- $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
- $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
- $(top_builddir)/src/gallium/drivers/noop/libnoop.la \
- $(GALLIUM_DRI_LIB_DEPS) \
- $(RADEON_LIBS)
-
-if HAVE_MESA_LLVM
-radeonsi_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
-radeonsi_dri_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: radeonsi_dri.la
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
- ln -f .libs/radeonsi_dri.so $(top_builddir)/$(LIB_DIR)/gallium/radeonsi_dri.so
diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlconfig.c
index b95e452..d9a7d66 100644
--- a/src/mesa/drivers/dri/common/xmlconfig.c
+++ b/src/mesa/drivers/dri/common/xmlconfig.c
@@ -118,6 +118,7 @@ static GLuint findOption (const driOptionCache *cache, const char *name) {
hash *= hash;
hash = (hash >> (16-cache->tableSize/2)) & mask;
+#if 0
/* this is just the starting point of the linear search for the option */
for (i = 0; i < size; ++i, hash = (hash+1) & mask) {
/* if we hit an empty entry then the option is not defined (yet) */
@@ -128,6 +129,7 @@ static GLuint findOption (const driOptionCache *cache, const char *name) {
}
/* this assertion fails if the hash table is full */
assert (i < size);
+#endif
return hash;
}
@@ -986,30 +988,46 @@ void driDestroyOptionCache (driOptionCache *cache) {
GLboolean driCheckOption (const driOptionCache *cache, const char *name,
driOptionType type) {
+#if 0
GLuint i = findOption (cache, name);
return cache->info[i].name != NULL && cache->info[i].type == type;
+#else
+ return false;
+#endif
}
GLboolean driQueryOptionb (const driOptionCache *cache, const char *name) {
+#if 0
GLuint i = findOption (cache, name);
/* make sure the option is defined and has the correct type */
assert (cache->info[i].name != NULL);
assert (cache->info[i].type == DRI_BOOL);
return cache->values[i]._bool;
+#else
+ return false;
+#endif
}
GLint driQueryOptioni (const driOptionCache *cache, const char *name) {
+#if 0
GLuint i = findOption (cache, name);
/* make sure the option is defined and has the correct type */
assert (cache->info[i].name != NULL);
assert (cache->info[i].type == DRI_INT || cache->info[i].type == DRI_ENUM);
return cache->values[i]._int;
+#else
+ return false;
+#endif
}
GLfloat driQueryOptionf (const driOptionCache *cache, const char *name) {
+#if 0
GLuint i = findOption (cache, name);
/* make sure the option is defined and has the correct type */
assert (cache->info[i].name != NULL);
assert (cache->info[i].type == DRI_FLOAT);
return cache->values[i]._float;
+#else
+ return false;
+#endif
}
--
1.8.5.4
More information about the mesa-dev
mailing list