[Mesa-dev] [PATCH 22/23] st/dri: merge dri/drm and dri/sw backends
Emil Velikov
emil.l.velikov at gmail.com
Tue Jun 17 11:38:38 PDT 2014
Move the driver_name to dri2/drisw and remove all the SPLIT_TAGETS
mayhem. In the next step we'll unify the dri and dri-swrast targets,
completing the gallium DRI megadriver.
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/gallium/Automake.inc | 2 +-
src/gallium/state_trackers/dri/Makefile.am | 36 +++++++++++++++--
src/gallium/state_trackers/dri/Makefile.sources | 14 +++++++
src/gallium/state_trackers/dri/SConscript | 35 ++++++++++++++--
src/gallium/state_trackers/dri/{drm => }/dri2.c | 17 +++-----
.../state_trackers/dri/{drm => }/dri2_buffer.h | 0
.../state_trackers/dri/{common => }/dri_context.c | 0
.../state_trackers/dri/{common => }/dri_context.h | 0
.../state_trackers/dri/{common => }/dri_drawable.c | 0
.../state_trackers/dri/{common => }/dri_drawable.h | 0
.../state_trackers/dri/{common => }/dri_screen.c | 15 ++-----
.../state_trackers/dri/{common => }/dri_screen.h | 3 +-
src/gallium/state_trackers/dri/{sw => }/drisw.c | 2 +-
src/gallium/state_trackers/dri/drm/Makefile.am | 46 ----------------------
.../state_trackers/dri/drm/Makefile.sources | 5 ---
src/gallium/state_trackers/dri/drm/SConscript | 24 -----------
src/gallium/state_trackers/dri/drm/dri_context.c | 1 -
src/gallium/state_trackers/dri/drm/dri_drawable.c | 1 -
src/gallium/state_trackers/dri/drm/dri_screen.c | 1 -
src/gallium/state_trackers/dri/sw/Makefile.am | 42 --------------------
src/gallium/state_trackers/dri/sw/Makefile.sources | 5 ---
src/gallium/state_trackers/dri/sw/SConscript | 23 -----------
src/gallium/state_trackers/dri/sw/dri_context.c | 1 -
src/gallium/state_trackers/dri/sw/dri_drawable.c | 1 -
src/gallium/state_trackers/dri/sw/dri_screen.c | 1 -
src/gallium/targets/dri-swrast/Makefile.am | 2 +-
src/gallium/targets/dri-swrast/SConscript | 4 +-
src/gallium/targets/dri/Makefile.am | 5 +--
src/gallium/targets/dri/SConscript | 2 +-
29 files changed, 96 insertions(+), 192 deletions(-)
create mode 100644 src/gallium/state_trackers/dri/Makefile.sources
rename src/gallium/state_trackers/dri/{drm => }/dri2.c (98%)
rename src/gallium/state_trackers/dri/{drm => }/dri2_buffer.h (100%)
rename src/gallium/state_trackers/dri/{common => }/dri_context.c (100%)
rename src/gallium/state_trackers/dri/{common => }/dri_context.h (100%)
rename src/gallium/state_trackers/dri/{common => }/dri_drawable.c (100%)
rename src/gallium/state_trackers/dri/{common => }/dri_drawable.h (100%)
rename src/gallium/state_trackers/dri/{common => }/dri_screen.c (97%)
rename src/gallium/state_trackers/dri/{common => }/dri_screen.h (97%)
rename src/gallium/state_trackers/dri/{sw => }/drisw.c (99%)
delete mode 100644 src/gallium/state_trackers/dri/drm/Makefile.am
delete mode 100644 src/gallium/state_trackers/dri/drm/Makefile.sources
delete mode 100644 src/gallium/state_trackers/dri/drm/SConscript
delete mode 120000 src/gallium/state_trackers/dri/drm/dri_context.c
delete mode 120000 src/gallium/state_trackers/dri/drm/dri_drawable.c
delete mode 120000 src/gallium/state_trackers/dri/drm/dri_screen.c
delete mode 100644 src/gallium/state_trackers/dri/sw/Makefile.am
delete mode 100644 src/gallium/state_trackers/dri/sw/Makefile.sources
delete mode 100644 src/gallium/state_trackers/dri/sw/SConscript
delete mode 120000 src/gallium/state_trackers/dri/sw/dri_context.c
delete mode 120000 src/gallium/state_trackers/dri/sw/dri_drawable.c
delete mode 120000 src/gallium/state_trackers/dri/sw/dri_screen.c
diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index 1a21cad..bef16c8 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -28,7 +28,7 @@ GALLIUM_DRIVER_CXXFLAGS = \
GALLIUM_DRI_CFLAGS = \
-I$(top_srcdir)/include \
- -I$(top_srcdir)/src/gallium/state_trackers/dri/common \
+ -I$(top_srcdir)/src/gallium/state_trackers/dri \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/gallium/auxiliary \
diff --git a/src/gallium/state_trackers/dri/Makefile.am b/src/gallium/state_trackers/dri/Makefile.am
index b89d02f..bda75c3 100644
--- a/src/gallium/state_trackers/dri/Makefile.am
+++ b/src/gallium/state_trackers/dri/Makefile.am
@@ -1,4 +1,5 @@
# Copyright © 2012 Intel Corporation
+# 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"),
@@ -20,12 +21,39 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
-SUBDIRS =
+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 \
+ -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)
+
+if HAVE_GALLIUM_STATIC_TARGETS
+AM_CPPFLAGS += \
+ -DGALLIUM_STATIC_TARGETS=1
+endif # HAVE_GALLIUM_STATIC_TARGETS
+
+noinst_LTLIBRARIES = libdri.la
+libdri_la_SOURCES = $(common_SOURCES)
if HAVE_DRISW
-SUBDIRS += sw
+if !HAVE_DRI2
+AM_CPPFLAGS += \
+ -D__NOT_HAVE_DRM_H
endif
+libdri_la_SOURCES += $(drisw_SOURCES)
+endif
+
-if HAVE_LIBDRM
-SUBDIRS += drm
+if HAVE_DRI2
+libdri_la_SOURCES += $(dri2_SOURCES)
endif
diff --git a/src/gallium/state_trackers/dri/Makefile.sources b/src/gallium/state_trackers/dri/Makefile.sources
new file mode 100644
index 0000000..5967796
--- /dev/null
+++ b/src/gallium/state_trackers/dri/Makefile.sources
@@ -0,0 +1,14 @@
+common_SOURCES := \
+ dri_context.c \
+ dri_context.h \
+ dri_drawable.c \
+ dri_drawable.h \
+ dri_screen.c \
+ dri_screen.h
+
+dri2_SOURCES := \
+ dri2.c \
+ dri2_buffer.h
+
+drisw_SOURCES := \
+ drisw.c
diff --git a/src/gallium/state_trackers/dri/SConscript b/src/gallium/state_trackers/dri/SConscript
index 7702d8e..89b0352 100644
--- a/src/gallium/state_trackers/dri/SConscript
+++ b/src/gallium/state_trackers/dri/SConscript
@@ -1,6 +1,35 @@
+#######################################################################
+# SConscript for dri state_tracker
+
Import('*')
-SConscript([
- 'sw/SConscript',
- 'drm/SConscript',
+env = env.Clone()
+
+# XXX: If HAVE_DRI2
+env.PkgUseModules(['DRM'])
+# else
+#env.Append(CPPDEFINES = [('__NOT_HAVE_DRM_H', '1')])
+
+env.Append(CPPPATH = [
+ '#/src/mapi',
+ '#/src/mesa',
+ '#/src/gallium/state_trackers/dri/common',
+ '#/src/mesa/drivers/dri/common',
+ xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
])
+
+env.Append(CPPDEFINES = [('GALLIUM_STATIC_TARGETS', '1')])
+
+sources = env.ParseSourceList('Makefile.sources', 'common_SOURCES')
+
+# XXX: if HAVE_DRISW
+sources.append(env.ParseSourceList('Makefile.sources', 'drisw_SOURCES'))
+
+# XXX: if HAVE_DRI2
+sources.append(env.ParseSourceList('Makefile.sources', 'dri2_SOURCES'))
+
+st_dri = env.ConvenienceLibrary(
+ target = 'st_dri',
+ source = sources
+)
+Export('st_dri')
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/dri2.c
similarity index 98%
rename from src/gallium/state_trackers/dri/drm/dri2.c
rename to src/gallium/state_trackers/dri/dri2.c
index cf77b26..55e8f8a 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -1089,14 +1089,6 @@ dri2_init_screen(__DRIscreen * sPriv)
sPriv->driverPrivate = (void *)screen;
-#if SPLIT_TARGETS
- pscreen = driver_descriptor.create_screen(screen->fd);
- if (driver_descriptor.configuration) {
- throttle_ret = driver_descriptor.configuration(DRM_CONF_THROTTLE);
- dmabuf_ret = driver_descriptor.configuration(DRM_CONF_SHARE_FD);
- }
-
-#else
#if GALLIUM_STATIC_TARGETS
pscreen = dd_create_screen(screen->fd);
@@ -1110,7 +1102,6 @@ dri2_init_screen(__DRIscreen * sPriv)
dmabuf_ret = pipe_loader_configuration(screen->dev, DRM_CONF_SHARE_FD);
}
#endif // GALLIUM_STATIC_TARGETS
-#endif // SPLIT_TARGETS
if (throttle_ret && throttle_ret->val.val_int != -1) {
screen->throttling_enabled = TRUE;
@@ -1133,7 +1124,11 @@ dri2_init_screen(__DRIscreen * sPriv)
/* dri_init_screen_helper checks pscreen for us */
- configs = dri_init_screen_helper(screen, pscreen);
+#if GALLIUM_STATIC_TARGETS
+ configs = dri_init_screen_helper(screen, pscreen, dd_driver_name());
+#else
+ configs = dri_init_screen_helper(screen, pscreen, screen->dev->driver_name);
+#endif // GALLIUM_STATIC_TARGETS
if (!configs)
goto fail;
@@ -1144,12 +1139,10 @@ dri2_init_screen(__DRIscreen * sPriv)
return configs;
fail:
dri_destroy_screen_helper(screen);
-#if !SPLIT_TARGETS
#if !GALLIUM_STATIC_TARGETS
if (screen->dev)
pipe_loader_release(&screen->dev, 1);
#endif // !GALLIUM_STATIC_TARGETS
-#endif // !SPLIT_TARGETS
FREE(screen);
return NULL;
}
diff --git a/src/gallium/state_trackers/dri/drm/dri2_buffer.h b/src/gallium/state_trackers/dri/dri2_buffer.h
similarity index 100%
rename from src/gallium/state_trackers/dri/drm/dri2_buffer.h
rename to src/gallium/state_trackers/dri/dri2_buffer.h
diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c
similarity index 100%
rename from src/gallium/state_trackers/dri/common/dri_context.c
rename to src/gallium/state_trackers/dri/dri_context.c
diff --git a/src/gallium/state_trackers/dri/common/dri_context.h b/src/gallium/state_trackers/dri/dri_context.h
similarity index 100%
rename from src/gallium/state_trackers/dri/common/dri_context.h
rename to src/gallium/state_trackers/dri/dri_context.h
diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
similarity index 100%
rename from src/gallium/state_trackers/dri/common/dri_drawable.c
rename to src/gallium/state_trackers/dri/dri_drawable.c
diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.h b/src/gallium/state_trackers/dri/dri_drawable.h
similarity index 100%
rename from src/gallium/state_trackers/dri/common/dri_drawable.h
rename to src/gallium/state_trackers/dri/dri_drawable.h
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
similarity index 97%
rename from src/gallium/state_trackers/dri/common/dri_screen.c
rename to src/gallium/state_trackers/dri/dri_screen.c
index dceb628..650dcb7 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -388,11 +388,9 @@ dri_destroy_screen(__DRIscreen * sPriv)
dri_destroy_screen_helper(screen);
-#if !SPLIT_TARGETS
#if !GALLIUM_STATIC_TARGETS
pipe_loader_release(&screen->dev, 1);
#endif // !GALLIUM_STATIC_TARGETS
-#endif // !SPLIT_TARGETS
free(screen);
sPriv->driverPrivate = NULL;
@@ -412,7 +410,8 @@ dri_postprocessing_init(struct dri_screen *screen)
const __DRIconfig **
dri_init_screen_helper(struct dri_screen *screen,
- struct pipe_screen *pscreen)
+ struct pipe_screen *pscreen,
+ const char* driver_name)
{
screen->base.screen = pscreen;
if (!screen->base.screen) {
@@ -437,15 +436,7 @@ dri_init_screen_helper(struct dri_screen *screen,
driParseConfigFiles(&screen->optionCache,
&screen->optionCacheDefaults,
screen->sPriv->myNum,
-#if SPLIT_TARGETS
- driver_descriptor.name);
-#else
-#if GALLIUM_STATIC_TARGETS
- dd_driver_name());
-#else
- screen->dev->driver_name);
-#endif // GALLIUM_STATIC_TARGETS
-#endif // SPLIT_TARGETS
+ driver_name);
/* Handle force_s3tc_enable. */
if (!util_format_s3tc_enabled &&
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.h b/src/gallium/state_trackers/dri/dri_screen.h
similarity index 97%
rename from src/gallium/state_trackers/dri/common/dri_screen.h
rename to src/gallium/state_trackers/dri/dri_screen.h
index 63758d2..f421b68 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.h
+++ b/src/gallium/state_trackers/dri/dri_screen.h
@@ -137,7 +137,8 @@ dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
const __DRIconfig **
dri_init_screen_helper(struct dri_screen *screen,
- struct pipe_screen *pscreen);
+ struct pipe_screen *pscreen,
+ const char* driver_name);
void
dri_destroy_screen_helper(struct dri_screen * screen);
diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/drisw.c
similarity index 99%
rename from src/gallium/state_trackers/dri/sw/drisw.c
rename to src/gallium/state_trackers/dri/drisw.c
index f1d5a06..607d222 100644
--- a/src/gallium/state_trackers/dri/sw/drisw.c
+++ b/src/gallium/state_trackers/dri/drisw.c
@@ -361,7 +361,7 @@ drisw_init_screen(__DRIscreen * sPriv)
pscreen = drisw_create_screen(&drisw_lf);
/* dri_init_screen_helper checks pscreen for us */
- configs = dri_init_screen_helper(screen, pscreen);
+ configs = dri_init_screen_helper(screen, pscreen, "swrast");
if (!configs)
goto fail;
diff --git a/src/gallium/state_trackers/dri/drm/Makefile.am b/src/gallium/state_trackers/dri/drm/Makefile.am
deleted file mode 100644
index 8052e6b..0000000
--- a/src/gallium/state_trackers/dri/drm/Makefile.am
+++ /dev/null
@@ -1,46 +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 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 \
- -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)
-
-if HAVE_GALLIUM_STATIC_TARGETS
-AM_CPPFLAGS += \
- -DGALLIUM_STATIC_TARGETS=1
-endif # HAVE_GALLIUM_STATIC_TARGETS
-
-noinst_LTLIBRARIES = libdridrm.la
-
-libdridrm_la_SOURCES = $(C_SOURCES)
diff --git a/src/gallium/state_trackers/dri/drm/Makefile.sources b/src/gallium/state_trackers/dri/drm/Makefile.sources
deleted file mode 100644
index b9b93a2..0000000
--- a/src/gallium/state_trackers/dri/drm/Makefile.sources
+++ /dev/null
@@ -1,5 +0,0 @@
-C_SOURCES := \
- dri_context.c \
- dri_screen.c \
- dri_drawable.c \
- dri2.c
diff --git a/src/gallium/state_trackers/dri/drm/SConscript b/src/gallium/state_trackers/dri/drm/SConscript
deleted file mode 100644
index 7616039..0000000
--- a/src/gallium/state_trackers/dri/drm/SConscript
+++ /dev/null
@@ -1,24 +0,0 @@
-#######################################################################
-# SConscript for dri state_tracker
-
-Import('*')
-
-env = env.Clone()
-
-env.PkgUseModules(['DRM'])
-
-env.Append(CPPPATH = [
- '#/src/mapi',
- '#/src/mesa',
- '#/src/gallium/state_trackers/dri/common',
- '#/src/mesa/drivers/dri/common',
- xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
-])
-
-env.Append(CPPDEFINES = [('GALLIUM_STATIC_TARGETS', '1')])
-
-st_dri = env.ConvenienceLibrary(
- target = 'st_dri',
- source = env.ParseSourceList('Makefile.sources', 'C_SOURCES')
-)
-Export('st_dri')
diff --git a/src/gallium/state_trackers/dri/drm/dri_context.c b/src/gallium/state_trackers/dri/drm/dri_context.c
deleted file mode 120000
index 5cfbbae..0000000
--- a/src/gallium/state_trackers/dri/drm/dri_context.c
+++ /dev/null
@@ -1 +0,0 @@
-../common/dri_context.c
\ No newline at end of file
diff --git a/src/gallium/state_trackers/dri/drm/dri_drawable.c b/src/gallium/state_trackers/dri/drm/dri_drawable.c
deleted file mode 120000
index 0fc19be..0000000
--- a/src/gallium/state_trackers/dri/drm/dri_drawable.c
+++ /dev/null
@@ -1 +0,0 @@
-../common/dri_drawable.c
\ No newline at end of file
diff --git a/src/gallium/state_trackers/dri/drm/dri_screen.c b/src/gallium/state_trackers/dri/drm/dri_screen.c
deleted file mode 120000
index 847f651..0000000
--- a/src/gallium/state_trackers/dri/drm/dri_screen.c
+++ /dev/null
@@ -1 +0,0 @@
-../common/dri_screen.c
\ No newline at end of file
diff --git a/src/gallium/state_trackers/dri/sw/Makefile.am b/src/gallium/state_trackers/dri/sw/Makefile.am
deleted file mode 100644
index 0cebd6d..0000000
--- a/src/gallium/state_trackers/dri/sw/Makefile.am
+++ /dev/null
@@ -1,42 +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 Makefile.sources
-include $(top_srcdir)/src/gallium/Automake.inc
-
-AM_CPPFLAGS = \
- $(GALLIUM_PIPE_LOADER_DEFINES) \
- -DPIPE_SEARCH_DIR=\"$(libdir)/gallium-pipe\" \
- -DSPLIT_TARGETS=1 \
- -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) \
- -D__NOT_HAVE_DRM_H
-
-noinst_LTLIBRARIES = libdrisw.la
-
-libdrisw_la_SOURCES = $(C_SOURCES)
diff --git a/src/gallium/state_trackers/dri/sw/Makefile.sources b/src/gallium/state_trackers/dri/sw/Makefile.sources
deleted file mode 100644
index 1255934..0000000
--- a/src/gallium/state_trackers/dri/sw/Makefile.sources
+++ /dev/null
@@ -1,5 +0,0 @@
-C_SOURCES := \
- dri_context.c \
- dri_screen.c \
- dri_drawable.c \
- drisw.c
diff --git a/src/gallium/state_trackers/dri/sw/SConscript b/src/gallium/state_trackers/dri/sw/SConscript
deleted file mode 100644
index 5a71b22..0000000
--- a/src/gallium/state_trackers/dri/sw/SConscript
+++ /dev/null
@@ -1,23 +0,0 @@
-#######################################################################
-# SConscript for dri state_tracker
-
-Import('*')
-
-env = env.Clone()
-
-env.Append(CPPPATH = [
- '#/src/mapi',
- '#/src/mesa',
- '#/src/gallium/state_trackers/dri/common',
- '#/src/mesa/drivers/dri/common',
- xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
-])
-
-env.Append(CPPDEFINES = [('__NOT_HAVE_DRM_H', '1')])
-env.Append(CPPDEFINES = [('SPLIT_TARGETS', '1')])
-
-st_drisw = env.ConvenienceLibrary(
- target = 'st_drisw',
- source = env.ParseSourceList('Makefile.sources', 'C_SOURCES')
-)
-Export('st_drisw')
diff --git a/src/gallium/state_trackers/dri/sw/dri_context.c b/src/gallium/state_trackers/dri/sw/dri_context.c
deleted file mode 120000
index 5cfbbae..0000000
--- a/src/gallium/state_trackers/dri/sw/dri_context.c
+++ /dev/null
@@ -1 +0,0 @@
-../common/dri_context.c
\ No newline at end of file
diff --git a/src/gallium/state_trackers/dri/sw/dri_drawable.c b/src/gallium/state_trackers/dri/sw/dri_drawable.c
deleted file mode 120000
index 0fc19be..0000000
--- a/src/gallium/state_trackers/dri/sw/dri_drawable.c
+++ /dev/null
@@ -1 +0,0 @@
-../common/dri_drawable.c
\ No newline at end of file
diff --git a/src/gallium/state_trackers/dri/sw/dri_screen.c b/src/gallium/state_trackers/dri/sw/dri_screen.c
deleted file mode 120000
index 847f651..0000000
--- a/src/gallium/state_trackers/dri/sw/dri_screen.c
+++ /dev/null
@@ -1 +0,0 @@
-../common/dri_screen.c
\ No newline at end of file
diff --git a/src/gallium/targets/dri-swrast/Makefile.am b/src/gallium/targets/dri-swrast/Makefile.am
index b52c4c2..3e3f1c7 100644
--- a/src/gallium/targets/dri-swrast/Makefile.am
+++ b/src/gallium/targets/dri-swrast/Makefile.am
@@ -40,7 +40,7 @@ swrast_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
swrast_dri_la_LIBADD = \
$(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
$(top_builddir)/src/mesa/drivers/dri/common/libmegadriver_stub.la \
- $(top_builddir)/src/gallium/state_trackers/dri/sw/libdrisw.la \
+ $(top_builddir)/src/gallium/state_trackers/dri/libdri.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 \
diff --git a/src/gallium/targets/dri-swrast/SConscript b/src/gallium/targets/dri-swrast/SConscript
index 2497ec6..374444b 100644
--- a/src/gallium/targets/dri-swrast/SConscript
+++ b/src/gallium/targets/dri-swrast/SConscript
@@ -7,11 +7,11 @@ env.Append(CPPPATH = [
'#/src/mapi',
'#/src/mesa',
'#/src/mesa/drivers/dri/common',
- '#/src/gallium/state_trackers/dri/common',
+ '#/src/gallium/state_trackers/dri',
])
env.Prepend(LIBS = [
- st_drisw,
+ st_dri,
ws_dri,
trace,
rbug,
diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index c4ee525..f7e6377 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -4,7 +4,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mapi \
-I$(top_srcdir)/src/mesa \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
- -I$(top_srcdir)/src/gallium/state_trackers/dri/common \
+ -I$(top_srcdir)/src/gallium/state_trackers/dri \
$(GALLIUM_TARGET_CFLAGS)
AM_CPPFLAGS = \
@@ -33,12 +33,11 @@ gallium_dri_la_LDFLAGS = \
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/dri/dri.sym
endif # HAVE_LD_VERSION_SCRIPT
-# XXX: Fold libdridrm/libdrisw as drivers become megadriver (__dri*DriverExtension) aware
gallium_dri_la_LIBADD = \
$(top_builddir)/src/mesa/libmesagallium.la \
$(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
$(top_builddir)/src/mesa/drivers/dri/common/libmegadriver_stub.la \
- $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
+ $(top_builddir)/src/gallium/state_trackers/dri/libdri.la \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(top_builddir)/src/gallium/drivers/galahad/libgalahad.la \
$(top_builddir)/src/gallium/drivers/noop/libnoop.la \
diff --git a/src/gallium/targets/dri/SConscript b/src/gallium/targets/dri/SConscript
index 6f01234..27e2047 100644
--- a/src/gallium/targets/dri/SConscript
+++ b/src/gallium/targets/dri/SConscript
@@ -11,7 +11,7 @@ env.Append(CPPPATH = [
'#/src/mapi',
'#/src/mesa',
'#/src/mesa/drivers/dri/common',
- '#/src/gallium/state_trackers/dri/common',
+ '#/src/gallium/state_trackers/dri',
])
if env['build'] == 'release':
--
2.0.0
More information about the mesa-dev
mailing list