[Libva] [PATCH] i965_drv_video: don't export internal driver functions.

Xiang, Haihao haihao.xiang at intel.com
Wed Aug 3 21:54:04 PDT 2011


call vaGetImage directly 

> This will make the conformance test fail because we need to hook i965_PutSurface to dump the decoded yuv file. Is there any other method? 
> 
> Thanks
> 
> Hai Lan
> 
> > -----Original Message-----
> > From: libva-bounces+hai.lan=intel.com at lists.freedesktop.org
> > [mailto:libva-bounces+hai.lan=intel.com at lists.freedesktop.org] On Behalf
> > Of Gwenole Beauchesne
> > Sent: Tuesday, July 26, 2011 7:48 PM
> > To: libva at lists.freedesktop.org
> > Subject: [Libva] [PATCH] i965_drv_video: don't export internal driver
> > functions.
> > 
> > From: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
> > 
> > Make sure to use our internal functions. In particular, we override
> > some DRM functions and they have to be used. e.g. this fixes VA/GLX.
> > ---
> >  i965_drv_video/Makefile.am      |    7 ++++++-
> >  i965_drv_video/i965_drv_video.c |    3 +++
> >  i965_drv_video/intel_compiler.h |   11 +++++++++++
> >  3 files changed, 20 insertions(+), 1 deletions(-)
> > 
> > diff --git a/i965_drv_video/Makefile.am b/i965_drv_video/Makefile.am
> > index c106aae..405489b 100644
> > --- a/i965_drv_video/Makefile.am
> > +++ b/i965_drv_video/Makefile.am
> > @@ -23,7 +23,6 @@
> >  SUBDIRS = shaders
> > 
> >  INCLUDES = \
> > -	-Wall			\
> >  	-I$(top_srcdir)		\
> >  	-I$(top_srcdir)/va	\
> >  	-I$(top_srcdir)/va/x11	\
> > @@ -31,6 +30,11 @@ INCLUDES = \
> >  	$(DRM_CFLAGS)		\
> >  	$(NULL)
> > 
> > +driver_cflags = \
> > +	-Wall			\
> > +	-fvisibility=hidden	\
> > +	$(NULL)
> > +
> >  driver_ldflags = \
> >  	-module -avoid-version	\
> >  	-no-undefined		\
> > @@ -88,6 +92,7 @@ source_h = \
> > 
> >  i965_drv_video_la_LTLIBRARIES	= i965_drv_video.la
> >  i965_drv_video_ladir		= $(LIBVA_DRIVERS_PATH)
> > +i965_drv_video_la_CFLAGS	= $(driver_cflags)
> >  i965_drv_video_la_LDFLAGS	= $(driver_ldflags)
> >  i965_drv_video_la_LIBADD	= $(top_builddir)/va/libva-x11.la -lpthread
> >  i965_drv_video_la_SOURCES	= $(source_c)
> > diff --git a/i965_drv_video/i965_drv_video.c
> > b/i965_drv_video/i965_drv_video.c
> > index 26b07a2..72f82b7 100644
> > --- a/i965_drv_video/i965_drv_video.c
> > +++ b/i965_drv_video/i965_drv_video.c
> > @@ -2522,6 +2522,9 @@ i965_UnlockSurface(
> >      return vaStatus;
> >  }
> > 
> > +VAStatus DLL_EXPORT
> > +VA_DRIVER_INIT_FUNC(VADriverContextP ctx);
> > +
> >  VAStatus
> >  VA_DRIVER_INIT_FUNC(  VADriverContextP ctx )
> >  {
> > diff --git a/i965_drv_video/intel_compiler.h
> > b/i965_drv_video/intel_compiler.h
> > index f1f24c8..e1c3bd2 100644
> > --- a/i965_drv_video/intel_compiler.h
> > +++ b/i965_drv_video/intel_compiler.h
> > @@ -12,4 +12,15 @@
> >  #  define INLINE
> >  #endif
> > 
> > +/**
> > + * Function visibility
> > + */
> > +#if defined(__GNUC__)
> > +#  define DLL_HIDDEN __attribute__((visibility("hidden")))
> > +#  define DLL_EXPORT __attribute__((visibility("default")))
> > +#else
> > +#  define DLL_HIDDEN
> > +#  define DLL_EXPORT
> > +#endif
> > +
> >  #endif /* _INTEL_COMPILER_H_ */
> > --
> > 1.7.4.1
> > 
> > _______________________________________________
> > Libva mailing list
> > Libva at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/libva
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libva




More information about the Libva mailing list