[Mesa-dev] [PATCH] auxiliary/vl: move most sources back into the aux library

Emil Velikov emil.l.velikov at gmail.com
Fri Dec 19 06:04:33 PST 2014


Due to the current implementation of the gl-vdpau interop, we depend on
the dri module having a working set of util VL functions. Otherwise we
will end up calling the stubs.

This commit partially reverts the following commits:
f093c1c8ec1(auxiliary/vl: add galliumvl_stub.la)
c642e87d9f4(auxiliary/vl: rework the build of the VL code)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86837
Cc: Andy Furniss <adf.lists at gmail.com>
Cc: Kertesz Laszlo <laszlo.kertesz at gmail.com>
Cc: Christian König <christian.koenig at amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/auxiliary/Android.mk            |   3 +-
 src/gallium/auxiliary/Makefile.am           |   4 -
 src/gallium/auxiliary/Makefile.sources      |  11 +--
 src/gallium/auxiliary/SConscript            |   1 -
 src/gallium/auxiliary/vl/vl_stubs.c         | 147 ----------------------------
 src/gallium/targets/d3dadapter9/Makefile.am |   1 -
 src/gallium/targets/dri/Makefile.am         |   1 -
 src/gallium/targets/gbm/Makefile.am         |   1 -
 src/gallium/targets/pipe-loader/Makefile.am |  12 +--
 src/gallium/targets/xa/Makefile.am          |   1 -
 10 files changed, 6 insertions(+), 176 deletions(-)
 delete mode 100644 src/gallium/auxiliary/vl/vl_stubs.c

diff --git a/src/gallium/auxiliary/Android.mk b/src/gallium/auxiliary/Android.mk
index 0bc1831..f0a2aaf 100644
--- a/src/gallium/auxiliary/Android.mk
+++ b/src/gallium/auxiliary/Android.mk
@@ -29,8 +29,7 @@ include $(LOCAL_PATH)/Makefile.sources
 include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := \
-	$(C_SOURCES) \
-	$(VL_STUB_SOURCES)
+	$(C_SOURCES)
 
 LOCAL_C_INCLUDES := \
 	$(GALLIUM_TOP)/auxiliary/util \
diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am
index 1053ce4..08adca3 100644
--- a/src/gallium/auxiliary/Makefile.am
+++ b/src/gallium/auxiliary/Makefile.am
@@ -47,10 +47,6 @@ util/u_format_table.c: $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format_
 	$(AM_V_GEN) $(PYTHON2) $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format.csv > $@
 
 
-noinst_LTLIBRARIES += libgalliumvl_stub.la
-libgalliumvl_stub_la_SOURCES = \
-	$(VL_STUB_SOURCES)
-
 if NEED_GALLIUM_VL
 
 noinst_LTLIBRARIES += libgalliumvl.la
diff --git a/src/gallium/auxiliary/Makefile.sources b/src/gallium/auxiliary/Makefile.sources
index 3460482..ca89adb 100644
--- a/src/gallium/auxiliary/Makefile.sources
+++ b/src/gallium/auxiliary/Makefile.sources
@@ -303,9 +303,7 @@ C_SOURCES := \
 	util/u_upload_mgr.h \
 	util/u_vbuf.c \
 	util/u_vbuf.h \
-	util/u_video.h
-
-VL_SOURCES := \
+	util/u_video.h \
 	vl/vl_compositor.c \
 	vl/vl_compositor.h \
 	vl/vl_csc.c \
@@ -334,13 +332,12 @@ VL_SOURCES := \
 	vl/vl_video_buffer.c \
 	vl/vl_video_buffer.h \
 	vl/vl_vlc.h \
-	vl/vl_winsys.h \
-	vl/vl_winsys_dri.c \
 	vl/vl_zscan.c \
 	vl/vl_zscan.h
 
-VL_STUB_SOURCES := \
-	vl/vl_stubs.c
+VL_SOURCES := \
+	vl/vl_winsys.h \
+	vl/vl_winsys_dri.c
 
 GENERATED_SOURCES := \
 	indices/u_indices_gen.c \
diff --git a/src/gallium/auxiliary/SConscript b/src/gallium/auxiliary/SConscript
index 6cb6b8c..6f67849 100644
--- a/src/gallium/auxiliary/SConscript
+++ b/src/gallium/auxiliary/SConscript
@@ -36,7 +36,6 @@ env.Depends('util/u_format_table.c', [
 
 source = env.ParseSourceList('Makefile.sources', [
     'C_SOURCES',
-    'VL_STUB_SOURCES',
     'GENERATED_SOURCES'
 ])
 
diff --git a/src/gallium/auxiliary/vl/vl_stubs.c b/src/gallium/auxiliary/vl/vl_stubs.c
deleted file mode 100644
index d690eca..0000000
--- a/src/gallium/auxiliary/vl/vl_stubs.c
+++ /dev/null
@@ -1,147 +0,0 @@
-#include <assert.h>
-
-#include "vl_decoder.h"
-#include "vl_mpeg12_bitstream.h"
-#include "vl_mpeg12_decoder.h"
-#include "vl_video_buffer.h"
-#include "vl_zscan.h"
-
-
-/*
- * vl_decoder stubs
- */
-bool
-vl_profile_supported(struct pipe_screen *screen,
-                     enum pipe_video_profile profile,
-                     enum pipe_video_entrypoint entrypoint)
-{
-   assert(0);
-   return false;
-}
-
-int
-vl_level_supported(struct pipe_screen *screen,
-                   enum pipe_video_profile profile)
-{
-   assert(0);
-   return 0;
-}
-
-struct pipe_video_codec *
-vl_create_decoder(struct pipe_context *pipe,
-                  const struct pipe_video_codec *templat)
-{
-   assert(0);
-   return NULL;
-}
-
-
-/*
- * vl_video_buffer stubs
- */
-const enum pipe_format *
-vl_video_buffer_formats(struct pipe_screen *screen, enum pipe_format format)
-{
-   assert(0);
-   return NULL;
-}
-
-boolean
-vl_video_buffer_is_format_supported(struct pipe_screen *screen,
-                                    enum pipe_format format,
-                                    enum pipe_video_profile profile,
-                                    enum pipe_video_entrypoint entrypoint)
-{
-   assert(0);
-   return false;
-}
-
-unsigned
-vl_video_buffer_max_size(struct pipe_screen *screen)
-{
-   assert(0);
-   return 0;
-}
-
-void
-vl_video_buffer_set_associated_data(struct pipe_video_buffer *vbuf,
-                                    struct pipe_video_codec *vcodec,
-                                    void *associated_data,
-                                    void (*destroy_associated_data)(void *))
-{
-   assert(0);
-}
-
-void *
-vl_video_buffer_get_associated_data(struct pipe_video_buffer *vbuf,
-                                    struct pipe_video_codec *vcodec)
-{
-   assert(0);
-   return NULL;
-}
-
-void
-vl_video_buffer_template(struct pipe_resource *templ,
-                         const struct pipe_video_buffer *tmpl,
-                         enum pipe_format resource_format,
-                         unsigned depth, unsigned array_size,
-                         unsigned usage, unsigned plane)
-{
-   assert(0);
-}
-
-struct pipe_video_buffer *
-vl_video_buffer_create(struct pipe_context *pipe,
-                       const struct pipe_video_buffer *tmpl)
-{
-   assert(0);
-   return NULL;
-}
-
-struct pipe_video_buffer *
-vl_video_buffer_create_ex2(struct pipe_context *pipe,
-                           const struct pipe_video_buffer *tmpl,
-                           struct pipe_resource *resources[VL_NUM_COMPONENTS])
-{
-   assert(0);
-   return NULL;
-}
-
-
-/*
- * vl_mpeg12_bitstream stubs
- */
-void
-vl_mpg12_bs_init(struct vl_mpg12_bs *bs, struct pipe_video_codec *decoder)
-{
-   assert(0);
-}
-
-void
-vl_mpg12_bs_decode(struct vl_mpg12_bs *bs,
-                   struct pipe_video_buffer *target,
-                   struct pipe_mpeg12_picture_desc *picture,
-                   unsigned num_buffers,
-                   const void * const *buffers,
-                   const unsigned *sizes)
-{
-   assert(0);
-}
-
-
-/*
- * vl_mpeg12_decoder stubs
- */
-struct pipe_video_codec *
-vl_create_mpeg12_decoder(struct pipe_context *pipe,
-                         const struct pipe_video_codec *templat)
-{
-   assert(0);
-   return NULL;
-}
-
-/*
- * vl_zscan
- */
-const int vl_zscan_normal[] = {0};
-const int vl_zscan_alternate[] = {0};
diff --git a/src/gallium/targets/d3dadapter9/Makefile.am b/src/gallium/targets/d3dadapter9/Makefile.am
index 1dc55f5..9c87d13 100644
--- a/src/gallium/targets/d3dadapter9/Makefile.am
+++ b/src/gallium/targets/d3dadapter9/Makefile.am
@@ -72,7 +72,6 @@ d3dadapter9_la_LDFLAGS += \
 endif # HAVE_LD_VERSION_SCRIPT
 
 d3dadapter9_la_LIBADD = \
-	$(top_builddir)/src/gallium/auxiliary/libgalliumvl_stub.la \
 	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
 	$(top_builddir)/src/gallium/state_trackers/nine/libninetracker.la \
 	$(top_builddir)/src/util/libmesautil.la \
diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index 5df3a20..16541da 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -43,7 +43,6 @@ gallium_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/libdri.la \
-	$(top_builddir)/src/gallium/auxiliary/libgalliumvl_stub.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/gbm/Makefile.am b/src/gallium/targets/gbm/Makefile.am
index aaf7580..e575994 100644
--- a/src/gallium/targets/gbm/Makefile.am
+++ b/src/gallium/targets/gbm/Makefile.am
@@ -33,7 +33,6 @@ gbm_gallium_drm_la_SOURCES =
 
 gbm_gallium_drm_la_LIBADD = \
 	$(top_builddir)/src/gallium/state_trackers/gbm/libgbm.la \
-	$(top_builddir)/src/gallium/auxiliary/libgalliumvl_stub.la \
 	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
 	$(top_builddir)/src/util/libmesautil.la \
 	$(LIBDRM_LIBS) \
diff --git a/src/gallium/targets/pipe-loader/Makefile.am b/src/gallium/targets/pipe-loader/Makefile.am
index 3d73a51..5d0abc1 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -36,17 +36,7 @@ AM_CPPFLAGS = \
 pipedir = $(libdir)/gallium-pipe
 pipe_LTLIBRARIES =
 
-PIPE_LIBS =
-
-if NEED_GALLIUM_VL
-PIPE_LIBS += \
-	$(top_builddir)/src/gallium/auxiliary/libgalliumvl.la
-else
-PIPE_LIBS += \
-	$(top_builddir)/src/gallium/auxiliary/libgalliumvl_stub.la
-endif
-
-PIPE_LIBS += \
+PIPE_LIBS = \
 	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
 	$(top_builddir)/src/util/libmesautil.la \
 	$(top_builddir)/src/gallium/drivers/rbug/librbug.la \
diff --git a/src/gallium/targets/xa/Makefile.am b/src/gallium/targets/xa/Makefile.am
index a1eae2a..14c80e5 100644
--- a/src/gallium/targets/xa/Makefile.am
+++ b/src/gallium/targets/xa/Makefile.am
@@ -35,7 +35,6 @@ libxatracker_la_SOURCES =
 
 libxatracker_la_LIBADD = \
 	$(top_builddir)/src/gallium/state_trackers/xa/libxatracker.la \
-	$(top_builddir)/src/gallium/auxiliary/libgalliumvl_stub.la \
 	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
 	$(top_builddir)/src/util/libmesautil.la \
 	$(LIBDRM_LIBS) \
-- 
2.1.3



More information about the mesa-dev mailing list