[Mesa-dev] [PATCH 2/6] st/va: skeleton VAAPI state tracker

Liu, Leo Leo.Liu at amd.com
Thu Sep 25 07:21:37 PDT 2014


Hi Gwenole and Emil,

>>>>> +gallium_drv_video_la_LIBADD = \
>>>>> +   $(top_builddir)/src/gallium/state_trackers/va/libvatracker.la \
>>>>> +   $(top_builddir)/src/gallium/auxiliary/libgallium.la \
>>>>> +   $(top_builddir)/src/util/libmesautil.la \
>>>>> +   $(LIBVA_LIBS) \
>>>> Unless I've missed something this link should not be needed. If in
>>>> doubt just omit it, and let the _compiler_ shout about undefined
>>>> symbols :)
>>>>
>>>>
>>> If you talk about $(LIBVA_LIBS), we probably need it.
>> Why do you insist on guessing when there is someone (normally the
>> linker but in this case me) else to check for you :'(
>
>Agreed with Emil, you will hardly have to depend on libva symbols from a VA
>driver perspective. i.e. that should be omitted, only the headers are useful.
>

the reason for $(LIBVA_LIBS) is for xcb lib, from configure.ac
+    PKG_CHECK_MODULES([LIBVA], [libva >= 0.35.0 x11-xcb xcb-dri2 >= $XCBDRI2_REQUIRED])

I will separate them, and remove libva for link.

Thanks,
Leo



>This holds to the Intel VA driver too, so I will have to apply Emil's patch. :)
>
>> $ ldd -r -u gallium_drv_video.so
>> Unused direct dependencies:
>>         /usr/lib/libva.so.1
>>
>>
>> Don't mean to come as rude, but did you even build the series ? It
>> seems to be failing on my system.
>>
>>
>> On 24/09/14 18:46, Leo Liu wrote:
>>> From: Christian König <christian.koenig at amd.com>
>>>
>>> This patch adds a skeleton VA-API state tracker, which is filled with
>>> live in the subsequent patches.
>>>
>>> v2: fixes in configure.ac and va state_tracker Makefile.am
>>>
>> "va target Makefile.am" to reflect reality :)
>>
>>> Signed-off-by: Christian König <christian.koenig at amd.com>
>>> Signed-off-by: Leo Liu <leo.liu at amd.com>
>>
>>> diff --git a/configure.ac b/configure.ac index 87c616b..5d363d7
>>> 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>> [...]
>>> +AC_ARG_WITH([va-libdir],
>>> +    [AS_HELP_STRING([--with-va-libdir=DIR],
>>> +        [directory for the VA libraries])],
>> [directory for the VA libraries @<:@default=`pkg-config libva
>> --variable=driverdir`@:>@])],
>>
>>
>> [...]
>>> --- /dev/null
>>> +++ b/src/gallium/targets/va/Makefile.am
>> [...]
>>> +gallium_drv_video_la_LIBADD = \
>>> +     $(top_builddir)/src/gallium/state_trackers/va/libvatracker.la \
>>> +     $(top_builddir)/src/gallium/auxiliary/libgallium.la \
>>> +     $(top_builddir)/src/util/libmesautil.la \
>>> +     $(VA_LIBS)
>>> +
>> Apart from removing VA_LIBS above you'll need to add a library or two.
>> The compiler/linker will nicely point out what is needed as it builds.
>>
>>
>> The if branch of the following conditional can be rewritten in 5 lines.
>> Check out the omx target for an example.
>>
>>> +if HAVE_GALLIUM_STATIC_TARGETS
>>> +
>>> +MEGADRIVERS =
>>> +STATIC_TARGET_CPPFLAGS = -DGALLIUM_STATIC_TARGETS=1
>>> +STATIC_TARGET_LIB_DEPS = \
>>> +     $(top_builddir)/src/loader/libloader.la
>>> +
>>> +if HAVE_GALLIUM_R600
>>> +STATIC_TARGET_LIB_DEPS += \
>>> +
>>> +$(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la
>>> +else
>>> +if HAVE_GALLIUM_RADEONSI
>>> +STATIC_TARGET_LIB_DEPS += \
>>> +
>>> +$(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la
>>> +endif
>>> +endif
>>> +
>> ...
>>
>>
>> Now let see how well it works with nouveau :P
>>
>> Cheers,
>> Emil
>>
>>> I will fix the rest in the v2.
>>>
>>> Thanks,
>>> Leo
>>>
>>>
>>>> Cheers,
>>>> Emil
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list