src/gallium/state_trackers/Makefile
src/gallium/state_trackers/clover/Makefile
src/gallium/state_trackers/dri/Makefile
- src/gallium/state_trackers/dri/drm/Makefile
- src/gallium/state_trackers/dri/sw/Makefile
src/gallium/state_trackers/egl/Makefile
src/gallium/state_trackers/gbm/Makefile
src/gallium/state_trackers/glx/xlib/Makefile
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 \
# 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"),
# 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
--- /dev/null
+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
+#######################################################################
+# 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')
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);
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;
/* 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;
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;
}
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;
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) {
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 &&
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);
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;
+++ /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 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)
+++ /dev/null
-C_SOURCES := \
- dri_context.c \
- dri_screen.c \
- dri_drawable.c \
- dri2.c
+++ /dev/null
-#######################################################################
-# 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')
+++ /dev/null
-../common/dri_context.c
\ No newline at end of file
+++ /dev/null
-../common/dri_drawable.c
\ No newline at end of file
+++ /dev/null
-../common/dri_screen.c
\ No newline at end of file
+++ /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 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)
+++ /dev/null
-C_SOURCES := \
- dri_context.c \
- dri_screen.c \
- dri_drawable.c \
- drisw.c
+++ /dev/null
-#######################################################################
-# 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')
+++ /dev/null
-../common/dri_context.c
\ No newline at end of file
+++ /dev/null
-../common/dri_drawable.c
\ No newline at end of file
+++ /dev/null
-../common/dri_screen.c
\ No newline at end of file
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 \
'#/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,
-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 = \
-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 \
'#/src/mapi',
'#/src/mesa',
'#/src/mesa/drivers/dri/common',
- '#/src/gallium/state_trackers/dri/common',
+ '#/src/gallium/state_trackers/dri',
])
if env['build'] == 'release':