[Mesa-dev] [PATCH 3/5] auxiliary/vl: add galliumvl_stub.la

Emil Velikov emil.l.velikov at gmail.com
Sat Nov 8 20:44:15 PST 2014


Will be used by the non-VL targets, to stub out the functions called
by the drivers. The entry point to those are within the VL
state-trackers, yet the compiler cannot determine that at link time.
Thus we'll need to stub them out to prevent unresolved symbols in the
dri, egl, gbm and pipe-loader targets.

Cc: Christian König <christian.koenig at amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/auxiliary/Makefile.am      |   5 ++
 src/gallium/auxiliary/Makefile.sources |   3 +
 src/gallium/auxiliary/vl/vl_stubs.c    | 147 +++++++++++++++++++++++++++++++++
 3 files changed, 155 insertions(+)
 create mode 100644 src/gallium/auxiliary/vl/vl_stubs.c

diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am
index 4d8ba89..1e268b2 100644
--- a/src/gallium/auxiliary/Makefile.am
+++ b/src/gallium/auxiliary/Makefile.am
@@ -46,3 +46,8 @@ indices/u_unfilled_gen.c: $(srcdir)/indices/u_unfilled_gen.py
 util/u_format_table.c: $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format_pack.py $(srcdir)/util/u_format_parse.py $(srcdir)/util/u_format.csv
 	$(AM_V_at)$(MKDIR_P) util
 	$(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)
diff --git a/src/gallium/auxiliary/Makefile.sources b/src/gallium/auxiliary/Makefile.sources
index f6621ef..9625ee5 100644
--- a/src/gallium/auxiliary/Makefile.sources
+++ b/src/gallium/auxiliary/Makefile.sources
@@ -159,6 +159,9 @@ C_SOURCES := \
         vl/vl_video_buffer.c \
 	vl/vl_deint_filter.c
 
+VL_STUB_SOURCES := \
+	vl/vl_stubs.c
+
 GENERATED_SOURCES := \
 	indices/u_indices_gen.c \
 	indices/u_unfilled_gen.c \
diff --git a/src/gallium/auxiliary/vl/vl_stubs.c b/src/gallium/auxiliary/vl/vl_stubs.c
new file mode 100644
index 0000000..d690eca
--- /dev/null
+++ b/src/gallium/auxiliary/vl/vl_stubs.c
@@ -0,0 +1,147 @@
+#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};
-- 
2.1.3



More information about the mesa-dev mailing list