From patchwork Mon Feb 10 18:34:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 3621851 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 175F6BF418 for ; Mon, 10 Feb 2014 18:34:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 10781201DD for ; Mon, 10 Feb 2014 18:34:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4E0CF201B6 for ; Mon, 10 Feb 2014 18:34:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 20734105817; Mon, 10 Feb 2014 10:34:43 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f176.google.com (mail-qc0-f176.google.com [209.85.216.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D9F9105812 for ; Mon, 10 Feb 2014 10:34:40 -0800 (PST) Received: by mail-qc0-f176.google.com with SMTP id e16so11121002qcx.7 for ; Mon, 10 Feb 2014 10:34:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IDLM8af+SWTfPz02+BAuHW9Varwuy+ZzgizRYmIC4lc=; b=Zf20VVRgltbzTqOgfpqnrkzcHW4DKWHqtqE/CwD5Zv9qHa/WZXcc10FuM8lCuwTDpN LfX4acf7nYYlIHyUetTeHoP+7Z5/IlGdAHOgv2impryGTS6BJT/e0vVAZIc2pSihGyYW uBnjmtVN9ir+7q1c24Wm6EkSZAoeoNOQ5kl97/tZE3bnl4iKqorTy/hZDvpYfK+cpJZV YCf9+203NFjfPYIfFwhofBPaH5qgunFDBU6b6w4e8o6WJSNF1ZdB6fSuGeNEfab/kpUO fj8JSLBWQR5zFzS1MeKjYS8I26eIaFWpcW05WSlKgRBmoTvnrocQ8dc0BGYhYz7aGDUQ GKFw== X-Received: by 10.224.87.193 with SMTP id x1mr50597137qal.70.1392057279643; Mon, 10 Feb 2014 10:34:39 -0800 (PST) Received: from localhost (pool-108-20-254-237.bstnma.east.verizon.net. [108.20.254.237]) by mx.google.com with ESMTPSA id r40sm10909112qga.23.2014.02.10.10.34.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Feb 2014 10:34:38 -0800 (PST) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCHv2 1/4] pipe-loader: split out "client" version Date: Mon, 10 Feb 2014 13:34:18 -0500 Message-Id: <1392057261-25942-2-git-send-email-robdclark@gmail.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1392057261-25942-1-git-send-email-robdclark@gmail.com> References: <1392057261-25942-1-git-send-email-robdclark@gmail.com> Cc: Emil Velikov , Rob Clark X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rob Clark Build two versions of pipe-loader, with only the client version linking in x11 client side dependencies. This will allow the XA state tracker to use pipe-loader. Signed-off-by: Rob Clark --- configure.ac | 14 +++++++++++-- src/gallium/auxiliary/pipe-loader/Makefile.am | 24 ++++++++++++++++++---- src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c | 2 ++ src/gallium/targets/gbm/Makefile.am | 4 ++-- src/gallium/targets/opencl/Makefile.am | 4 ++-- src/gallium/tests/trivial/Makefile.am | 4 ++-- 6 files changed, 40 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index ba158e8..cba6301 100644 --- a/configure.ac +++ b/configure.ac @@ -1895,6 +1895,11 @@ AM_CONDITIONAL(NEED_GALLIUM_LLVMPIPE_DRIVER, test "x$HAVE_GALLIUM_I915" = xyes - "x$HAVE_GALLIUM_SOFTPIPE" = xyes \ && test "x$MESA_LLVM" = x1) +# NOTE: anything using xcb or other client side libs ends up in separate +# _CLIENT variables. The pipe loader is built in two variants, +# one that is standalone and does not link any x client libs (for +# use by XA tracker in particular, but could be used in any case +# where communication with xserver is not desired). if test "x$enable_gallium_loader" = xyes; then GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/null" @@ -1903,13 +1908,18 @@ if test "x$enable_gallium_loader" = xyes; then PKG_CHECK_MODULES([GALLIUM_PIPE_LOADER_XCB], [xcb xcb-dri2], pipe_loader_have_xcb=yes, pipe_loader_have_xcb=no) if test "x$pipe_loader_have_xcb" = xyes; then - GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_XCB" - GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS $GALLIUM_PIPE_LOADER_XCB_LIBS $LIBDRM_LIBS" + GALLIUM_PIPE_LOADER_CLIENT_DEFINES="$GALLIUM_PIPE_LOADER_CLIENT_DEFINES -DHAVE_PIPE_LOADER_XCB" + GALLIUM_PIPE_LOADER_CLIENT_LIBS="$GALLIUM_PIPE_LOADER_CLIENT_LIBS $GALLIUM_PIPE_LOADER_XCB_LIBS $LIBDRM_LIBS" fi fi + GALLIUM_PIPE_LOADER_CLIENT_DEFINES="$GALLIUM_PIPE_LOADER_CLIENT_DEFINES $GALLIUM_PIPE_LOADER_DEFINES" + GALLIUM_PIPE_LOADER_CLIENT_LIBS="$GALLIUM_PIPE_LOADER_CLIENT_LIBS $GALLIUM_PIPE_LOADER_LIBS" + AC_SUBST([GALLIUM_PIPE_LOADER_DEFINES]) AC_SUBST([GALLIUM_PIPE_LOADER_LIBS]) + AC_SUBST([GALLIUM_PIPE_LOADER_CLIENT_DEFINES]) + AC_SUBST([GALLIUM_PIPE_LOADER_CLIENT_LIBS]) fi AM_CONDITIONAL(HAVE_I915_DRI, test x$HAVE_I915_DRI = xyes) diff --git a/src/gallium/auxiliary/pipe-loader/Makefile.am b/src/gallium/auxiliary/pipe-loader/Makefile.am index 8e4d034..72b4798 100644 --- a/src/gallium/auxiliary/pipe-loader/Makefile.am +++ b/src/gallium/auxiliary/pipe-loader/Makefile.am @@ -1,7 +1,6 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CPPFLAGS = $(DEFINES) \ - $(GALLIUM_PIPE_LOADER_DEFINES) \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src/loader \ -I$(top_srcdir)/src/gallium/include \ @@ -12,8 +11,9 @@ noinst_LTLIBRARIES = if HAVE_LOADER_GALLIUM noinst_LTLIBRARIES += libpipe_loader.la +noinst_LTLIBRARIES += libpipe_loader_client.la -libpipe_loader_la_SOURCES = \ +COMMON_SOURCES = \ pipe_loader.h \ pipe_loader_priv.h \ pipe_loader.c \ @@ -22,10 +22,26 @@ libpipe_loader_la_SOURCES = \ if HAVE_DRM_LOADER_GALLIUM AM_CFLAGS = $(LIBDRM_CFLAGS) -libpipe_loader_la_SOURCES += pipe_loader_drm.c +COMMON_SOURCES += pipe_loader_drm.c -libpipe_loader_la_LIBADD = \ +COMMON_LIBADD = \ $(top_builddir)/src/loader/libloader.la endif + +libpipe_loader_la_CFLAGS = \ + -DSTANDALONE_LOADER \ + $(GALLIUM_PIPE_LOADER_DEFINES) \ + $(AM_CFLAGS) $(AM_CPPFLAGS) +libpipe_loader_la_SOURCES = $(COMMON_SOURCES) +libpipe_loader_la_LIBADD = $(COMMON_LIBADD) \ + $(GALLIUM_PIPE_LOADER_LIBS) + +libpipe_loader_client_la_CFLAGS = \ + $(GALLIUM_PIPE_LOADER_CLIENT_DEFINES) \ + $(AM_CFLAGS) $(AM_CPPFLAGS) +libpipe_loader_client_la_SOURCES = $(COMMON_SOURCES) +libpipe_loader_client_la_LIBADD = $(COMMON_LIBADD) \ + $(GALLIUM_PIPE_LOADER_CLIENT_LIBS) + endif diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c index 95a4f84..e53e8af 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c @@ -47,7 +47,9 @@ static struct sw_winsys *(*backends[])() = { #ifdef HAVE_WINSYS_XLIB x11_sw_create, #endif +#ifndef STANDALONE_LOADER null_sw_create +#endif }; int diff --git a/src/gallium/targets/gbm/Makefile.am b/src/gallium/targets/gbm/Makefile.am index 4299d07..30a3427 100644 --- a/src/gallium/targets/gbm/Makefile.am +++ b/src/gallium/targets/gbm/Makefile.am @@ -42,8 +42,8 @@ gbm_LTLIBRARIES = gbm_gallium_drm.la gbm_gallium_drm_la_SOURCES = gbm.c gbm_gallium_drm_la_LIBADD = \ - $(GALLIUM_PIPE_LOADER_LIBS) \ - $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader.la \ + $(GALLIUM_PIPE_LOADER_CLIENT_LIBS) \ + $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_client.la \ $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la \ $(top_builddir)/src/gallium/state_trackers/gbm/libgbm.la \ $(top_builddir)/src/gallium/auxiliary/libgallium.la \ diff --git a/src/gallium/targets/opencl/Makefile.am b/src/gallium/targets/opencl/Makefile.am index 653302c..a75b49c 100644 --- a/src/gallium/targets/opencl/Makefile.am +++ b/src/gallium/targets/opencl/Makefile.am @@ -7,11 +7,11 @@ lib@OPENCL_LIBNAME@_la_LDFLAGS = \ -version-number 1:0 lib@OPENCL_LIBNAME@_la_LIBADD = \ - $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader.la \ + $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_client.la \ $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la \ $(top_builddir)/src/gallium/state_trackers/clover/libclover.la \ $(top_builddir)/src/gallium/auxiliary/libgallium.la \ - $(GALLIUM_PIPE_LOADER_LIBS) $(LIBUDEV_LIBS) \ + $(GALLIUM_PIPE_LOADER_CLIENT_LIBS) $(LIBUDEV_LIBS) \ -ldl \ -lclangCodeGen \ -lclangFrontendTool \ diff --git a/src/gallium/tests/trivial/Makefile.am b/src/gallium/tests/trivial/Makefile.am index d65eb86..65fa90d 100644 --- a/src/gallium/tests/trivial/Makefile.am +++ b/src/gallium/tests/trivial/Makefile.am @@ -11,8 +11,8 @@ AM_CPPFLAGS = \ -DPIPE_SEARCH_DIR=\"$(PIPE_SRC_DIR)/.libs\" \ $(GALLIUM_PIPE_LOADER_DEFINES) -LDADD = $(GALLIUM_PIPE_LOADER_LIBS) \ - $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader.la \ +LDADD = $(GALLIUM_PIPE_LOADER_CLIENT_LIBS) \ + $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_client.la \ $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la \ $(top_builddir)/src/gallium/auxiliary/libgallium.la \ $(LIBUDEV_LIBS) \