From: sguttula <suresh.gutt...@amd.com> This patch will exclude X11 dependencies from gallium video driver for freon based platforms which dont use X11
Signed-off-by: Guttula, Suresh <suresh.gutt...@amd.com> Reviewed-by: Christian König <christian.koe...@amd.com> --- src/gallium/auxiliary/Makefile.am | 7 +++++++ src/gallium/auxiliary/Makefile.sources | 4 +++- src/gallium/state_trackers/va/context.c | 2 ++ src/gallium/targets/va/Makefile.am | 8 +++++++- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am index 4a4a4fb..f97c8b1 100644 --- a/src/gallium/auxiliary/Makefile.am +++ b/src/gallium/auxiliary/Makefile.am @@ -84,6 +84,11 @@ libgalliumvlwinsys_la_CFLAGS = \ libgalliumvlwinsys_la_SOURCES = \ $(VL_WINSYS_SOURCES) +if HAVE_PLATFORM_X11 + +libgalliumvlwinsys_la_SOURCES += \ + $(VL_WINSYS_DRI_SOURCES) + if HAVE_DRI3 libgalliumvlwinsys_la_SOURCES += \ @@ -95,6 +100,8 @@ endif endif +endif + EXTRA_DIST = \ SConscript \ indices/u_indices.c \ diff --git a/src/gallium/auxiliary/Makefile.sources b/src/gallium/auxiliary/Makefile.sources index 5d4fe30..c823fde 100644 --- a/src/gallium/auxiliary/Makefile.sources +++ b/src/gallium/auxiliary/Makefile.sources @@ -354,9 +354,11 @@ VL_SOURCES := \ # XXX: Nuke this as our dri targets no longer depend on VL. VL_WINSYS_SOURCES := \ - vl/vl_winsys_dri.c \ vl/vl_winsys_drm.c +VL_WINSYS_DRI_SOURCES := \ + vl/vl_winsys_dri.c + VL_WINSYS_DRI3_SOURCES := \ vl/vl_winsys_dri3.c diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c index 65ba7db..451b566 100644 --- a/src/gallium/state_trackers/va/context.c +++ b/src/gallium/state_trackers/va/context.c @@ -118,6 +118,7 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx) return VA_STATUS_ERROR_UNIMPLEMENTED; case VA_DISPLAY_GLX: case VA_DISPLAY_X11: +#if defined(HAVE_PLATFORM_X11) #if defined(HAVE_DRI3) drv->vscreen = vl_dri3_screen_create(ctx->native_dpy, ctx->x11_screen); #endif @@ -125,6 +126,7 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx) drv->vscreen = vl_dri2_screen_create(ctx->native_dpy, ctx->x11_screen); if (!drv->vscreen) goto error_screen; +#endif break; case VA_DISPLAY_WAYLAND: case VA_DISPLAY_DRM: diff --git a/src/gallium/targets/va/Makefile.am b/src/gallium/targets/va/Makefile.am index df825b7..4690365 100644 --- a/src/gallium/targets/va/Makefile.am +++ b/src/gallium/targets/va/Makefile.am @@ -29,10 +29,16 @@ gallium_drv_video_la_LIBADD = \ $(top_builddir)/src/gallium/auxiliary/libgalliumvl.la \ $(top_builddir)/src/gallium/auxiliary/libgallium.la \ $(top_builddir)/src/util/libmesautil.la \ - $(VL_LIBS) \ $(LIBDRM_LIBS) \ $(GALLIUM_COMMON_LIB_DEPS) +if HAVE_PLATFORM_X11 + +gallium_drv_video_la_LIBADD += \ + $(VL_LIBS) + +endif + EXTRA_gallium_drv_video_la_DEPENDENCIES = va.sym EXTRA_DIST = va.sym -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev