{auxiliary,targets}/vl: use static/dynamic pipe-loader
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 20 Nov 2015 18:02:12 +0000 (18:02 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 21 Nov 2015 12:52:20 +0000 (12:52 +0000)
Analogous to previous commit.

v2: rebase on top of vl_winsys_drm.c addition

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
src/gallium/auxiliary/Makefile.am
src/gallium/auxiliary/vl/vl_winsys_dri.c
src/gallium/auxiliary/vl/vl_winsys_drm.c
src/gallium/targets/omx/Makefile.am
src/gallium/targets/omx/target.c
src/gallium/targets/va/Makefile.am
src/gallium/targets/va/target.c
src/gallium/targets/vdpau/Makefile.am
src/gallium/targets/vdpau/target.c
src/gallium/targets/xvmc/Makefile.am
src/gallium/targets/xvmc/target.c

index 7ff8972f8c0250d6e06abf5af61733874f0d3790..ee296ceda332829353bc53bf750a5abda38527e6 100644 (file)
@@ -64,12 +64,6 @@ COMMON_VL_CFLAGS = \
        $(DRI2PROTO_CFLAGS) \
        $(LIBDRM_CFLAGS)
 
-if HAVE_GALLIUM_STATIC_TARGETS
-COMMON_VL_CFLAGS += \
-       -DGALLIUM_STATIC_TARGETS=1
-
-endif # HAVE_GALLIUM_STATIC_TARGETS
-
 noinst_LTLIBRARIES += libgalliumvl.la
 
 libgalliumvl_la_CFLAGS = \
index fb16adc966c838e8c6fbb947bfc8d4db8ff736c8..c4f9295271f771841a5cf4222eb4d26716cb75c3 100644 (file)
@@ -402,12 +402,8 @@ vl_dri2_screen_create(Display *display, int screen)
    if (authenticate == NULL || !authenticate->authenticated)
       goto free_authenticate;
 
-#if GALLIUM_STATIC_TARGETS
-   scrn->base.pscreen = dd_create_screen(fd);
-#else
    if (pipe_loader_drm_probe_fd(&scrn->base.dev, fd))
       scrn->base.pscreen = pipe_loader_create_screen(scrn->base.dev);
-#endif // GALLIUM_STATIC_TARGETS
 
    if (!scrn->base.pscreen)
       goto release_pipe;
@@ -430,10 +426,8 @@ vl_dri2_screen_create(Display *display, int screen)
    return &scrn->base;
 
 release_pipe:
-#if !GALLIUM_STATIC_TARGETS
    if (scrn->base.dev)
       pipe_loader_release(&scrn->base.dev, 1);
-#endif // !GALLIUM_STATIC_TARGETS
 free_authenticate:
    free(authenticate);
 free_connect:
@@ -462,8 +456,6 @@ vl_dri2_screen_destroy(struct vl_screen *vscreen)
 
    vl_dri2_destroy_drawable(scrn);
    scrn->base.pscreen->destroy(scrn->base.pscreen);
-#if !GALLIUM_STATIC_TARGETS
    pipe_loader_release(&scrn->base.dev, 1);
-#endif // !GALLIUM_STATIC_TARGETS
    FREE(scrn);
 }
index f4e8306b67c7b40d8ad6778fcb45efb6203eb668..f993e2c77279f9fa87b3e26982c3af39cec7397a 100644 (file)
@@ -46,12 +46,8 @@ vl_drm_screen_create(int fd)
    if (!vscreen)
       return NULL;
 
-#if GALLIUM_STATIC_TARGETS
-   vscreen->pscreen = dd_create_screen(fd);
-#else
    if (pipe_loader_drm_probe_fd(&vscreen->dev, dup(fd)))
       vscreen->pscreen = pipe_loader_create_screen(vscreen->dev);
-#endif
 
    if (!vscreen->pscreen)
       goto error;
@@ -65,10 +61,9 @@ vl_drm_screen_create(int fd)
    return vscreen;
 
 error:
-#if !GALLIUM_STATIC_TARGETS
    if (vscreen->dev)
       pipe_loader_release(&vscreen->dev, 1);
-#endif // !GALLIUM_STATIC_TARGETS
+
    FREE(vscreen);
    return NULL;
 }
@@ -79,10 +74,6 @@ vl_drm_screen_destroy(struct vl_screen *vscreen)
    assert(vscreen);
 
    vscreen->pscreen->destroy(vscreen->pscreen);
-
-#if !GALLIUM_STATIC_TARGETS
    pipe_loader_release(&vscreen->dev, 1);
-#endif
-
    FREE(vscreen);
 }
index f9c0842179dad995fc23b0703162c0853a3dcbcf..3bdb9eb7e61e09cd3e2538fd8365684c4c3012c4 100644 (file)
@@ -40,7 +40,7 @@ if HAVE_GALLIUM_STATIC_TARGETS
 
 TARGET_DRIVERS =
 TARGET_CPPFLAGS =
-TARGET_LIB_DEPS = $(top_builddir)/src/loader/libloader.la
+TARGET_LIB_DEPS =
 
 
 include $(top_srcdir)/src/gallium/drivers/nouveau/Automake.inc
@@ -50,7 +50,10 @@ include $(top_srcdir)/src/gallium/drivers/radeonsi/Automake.inc
 
 libomx_mesa_la_SOURCES += target.c
 libomx_mesa_la_CPPFLAGS = $(TARGET_CPPFLAGS)
-libomx_mesa_la_LIBADD += $(TARGET_LIB_DEPS) \
+libomx_mesa_la_LIBADD += \
+       $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_static.la \
+       $(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
+       $(TARGET_LIB_DEPS) \
        $(TARGET_RADEON_WINSYS) $(TARGET_RADEON_COMMON)
 
 else # HAVE_GALLIUM_STATIC_TARGETS
index fde4a4a7dcfc59615a0c82c473297e7fa9ce58d8..42b1346d341debbd2a04d64a8893dd7f86b64db1 100644 (file)
@@ -1 +1 @@
-#include "target-helpers/inline_drm_helper.h"
+#include "target-helpers/drm_helper.h"
index 17b9ae3e8223f79e089a95fddf360231ea29b02a..733e7acb45578fce8184cb4489d7c6daaf9a6f21 100644 (file)
@@ -40,14 +40,17 @@ if HAVE_GALLIUM_STATIC_TARGETS
 
 TARGET_DRIVERS =
 TARGET_CPPFLAGS =
-TARGET_LIB_DEPS = $(top_builddir)/src/loader/libloader.la
+TARGET_LIB_DEPS =
 
 include $(top_srcdir)/src/gallium/drivers/r600/Automake.inc
 include $(top_srcdir)/src/gallium/drivers/radeonsi/Automake.inc
 
 gallium_drv_video_la_SOURCES += target.c
 gallium_drv_video_la_CPPFLAGS = $(TARGET_CPPFLAGS)
-gallium_drv_video_la_LIBADD += $(TARGET_LIB_DEPS) \
+gallium_drv_video_la_LIBADD += \
+       $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_static.la \
+       $(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
+       $(TARGET_LIB_DEPS) \
        $(TARGET_RADEON_WINSYS) $(TARGET_RADEON_COMMON)
 
 else # HAVE_GALLIUM_STATIC_TARGETS
index fde4a4a7dcfc59615a0c82c473297e7fa9ce58d8..42b1346d341debbd2a04d64a8893dd7f86b64db1 100644 (file)
@@ -1 +1 @@
-#include "target-helpers/inline_drm_helper.h"
+#include "target-helpers/drm_helper.h"
index f9fb56069a9e3dc0fac0f0ae8ec08c1e20855e29..d388f8b5014c0b9a9382480b3e891acae71525f7 100644 (file)
@@ -47,7 +47,7 @@ EXTRA_DIST = \
 
 TARGET_DRIVERS =
 TARGET_CPPFLAGS =
-TARGET_LIB_DEPS = $(top_builddir)/src/loader/libloader.la
+TARGET_LIB_DEPS =
 
 include $(top_srcdir)/src/gallium/drivers/nouveau/Automake.inc
 
@@ -59,7 +59,10 @@ if HAVE_GALLIUM_STATIC_TARGETS
 
 libvdpau_gallium_la_SOURCES += target.c
 libvdpau_gallium_la_CPPFLAGS = $(TARGET_CPPFLAGS)
-libvdpau_gallium_la_LIBADD += $(TARGET_LIB_DEPS) \
+libvdpau_gallium_la_LIBADD += \
+       $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_static.la \
+       $(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
+       $(TARGET_LIB_DEPS) \
        $(TARGET_RADEON_WINSYS) $(TARGET_RADEON_COMMON)
 
 else # HAVE_GALLIUM_STATIC_TARGETS
index fde4a4a7dcfc59615a0c82c473297e7fa9ce58d8..42b1346d341debbd2a04d64a8893dd7f86b64db1 100644 (file)
@@ -1 +1 @@
-#include "target-helpers/inline_drm_helper.h"
+#include "target-helpers/drm_helper.h"
index 5fcfc88dd5315d6f210b2d8566b99943a50f83b0..fdc5f4b7318722b8acbfd794654735483d7e1add 100644 (file)
@@ -38,7 +38,7 @@ EXTRA_DIST = xvmc.sym
 
 TARGET_DRIVERS =
 TARGET_CPPFLAGS =
-TARGET_LIB_DEPS = $(top_builddir)/src/loader/libloader.la
+TARGET_LIB_DEPS =
 
 include $(top_srcdir)/src/gallium/drivers/nouveau/Automake.inc
 
@@ -48,7 +48,10 @@ if HAVE_GALLIUM_STATIC_TARGETS
 
 libXvMCgallium_la_SOURCES += target.c
 libXvMCgallium_la_CPPFLAGS = $(TARGET_CPPFLAGS)
-libXvMCgallium_la_LIBADD += $(TARGET_LIB_DEPS) \
+libXvMCgallium_la_LIBADD += \
+       $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_static.la \
+       $(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
+       $(TARGET_LIB_DEPS) \
        $(TARGET_RADEON_WINSYS) $(TARGET_RADEON_COMMON)
 
 else # HAVE_GALLIUM_STATIC_TARGETS
index fde4a4a7dcfc59615a0c82c473297e7fa9ce58d8..42b1346d341debbd2a04d64a8893dd7f86b64db1 100644 (file)
@@ -1 +1 @@
-#include "target-helpers/inline_drm_helper.h"
+#include "target-helpers/drm_helper.h"