[FFmpeg-devel] [PATCH 4/4] avutil/hwcontext_vulkan: fully support customizable validation layers

Wu Jianhua toqsxw at outlook.com
Tue Nov 23 13:03:01 EET 2021


Lynne:
>23 Nov 2021, 10:48 by jianhua.wu at intel.com:
>>Lynne:
>>> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
>>> Lynne
>>> Sent: Tuesday, November 23, 2021 5:23 PM
>>> To: FFmpeg development discussions and patches <ffmpeg-
>>> devel at ffmpeg.org>
>>> Subject: Re: [FFmpeg-devel] [PATCH 4/4] avutil/hwcontext_vulkan: fully
>>> support customizable validation layers
>>>
>>> 23 Nov 2021, 10:01 by jianhua.wu at intel.com:
>>>
>>> > Validation layer is an indispensable part of developing on Vulkan.
>>> >
>>> > The following commands is on how to enable validation layers:
>>> >
>>> > ffmpeg -init_hw_device
>>> >
>>> vulkan=0,debug=1,validation_layers=VK_LAYER_KHRONOS_validation+VK_L
>>> AYE
>>> > R_LUNARG_api_dump
>>> >
>>> > Signed-off-by: Wu Jianhua <jianhua.wu at intel.com>
>>> > ---
>>> >  libavutil/hwcontext_vulkan.c | 110 ++++++++++++++++++++++++++++---
>>> ----
>>> >  libavutil/hwcontext_vulkan.h |   7 +++
>>> >  2 files changed, 97 insertions(+), 20 deletions(-)
>>> >
>>> >
>>> > +    /**
>>> > +     * Enabled validation layers.
>>> > +     * If no layers are enabled, set these fields to NULL, and 0 respectively.
>>> > +     */
>>> > +    const char * const *enabled_validation_layers;
>>> > +    int nb_enabled_validation_layers;
>>> > +
>>> >
>>>
>>> Why are you exposing them? Do API users really need to know this?
>>>
>>
>> It's okay. For it's only integrated in a really small separate function it
>> could be skipped by the status debug_mode as before. And validation
>> layers are embed by other specific drivers, platforms(such as those
>> specific layers in androids) or SDK, the FFmpeg is not need to do anything
>> more whatever the current is compiled with optimization mode or debug mode.
>> The use who only want to use filter is simply not able to know how to
>> enable the debug_mode. For me, as a user also, it is important to me, I
>> don't want to changed the code then compiling to use the specific validation
>> layers again and again.  And not only the developer need to use it, those
>> people who help us test could report a more detailed problem. I think it's
>> really benefit.
>>
>
> Sorry, I didn't quite understand that.
> I'm not objecting to being able to use custom debug layers and activating
> them if they're requested from the user. We already do that for the
> standard debug layer anyway. I'm just not sure I understand why filters
> would need to know if a debug layer is ran, and which one it is, by exposing
> them via the public API.
>

Oh! My bad. I supposed you mean we may be not necessary to expose
layer info to the Device Context, right?



More information about the ffmpeg-devel mailing list