[FFmpeg-devel] [PATCH 2/2] hwcontext_vulkan: expose enabled device and instance extensions

Lynne dev at lynne.ee
Sun May 10 17:23:59 EEST 2020


May 10, 2020, 14:33 by sw at jkqxz.net:

> On 10/05/2020 11:54, Lynne wrote:
>
>>  */
>>  VkInstance inst;
>> +    /**
>> +     * Enabled instance extensions. By default, VK_KHR_surface is enabled if found.
>> +     */
>>
>
> Clarify how this should be set by the user if they are supplying the instance?  (From code, looks like it's not used.)
>

Done.



>> +    const char * const *enabled_inst_extensions;
>> +    int num_enabled_inst_extensions;
>>  /**
>>  * Physical device
>>  */
>> @@ -50,6 +55,13 @@ typedef struct AVVulkanDeviceContext {
>>  * Active device
>>  */
>>  VkDevice act_dev;
>> +    /**
>> +     * Enabled device extensions. By default, VK_KHR_external_memory_fd,
>> +     * VK_EXT_external_memory_dma_buf, VK_EXT_image_drm_format_modifier and
>> +     * VK_KHR_external_semaphore_fd are enabled if found.
>> +     */
>>
>
> Clarify how this should be set by the user if they are supplying the device?  (From code, looks like it's required.)
>

Done (it isn't required, and can be NULL).



>> +    const char * const *enabled_dev_extensions;
>> +    int num_enabled_dev_extensions;
>>  /**
>>  * Queue family index for graphics
>>  * @note av_hwdevice_create() will set all 3 queue indices if unset
>> -- 
>> 2.26.2
>>
>
> I think you need to put the new fields at the end to avoid the worst ABI break (upgrade libavutil and crash trying to use the device fields because they've moved).
>
> The API change with the new field being required is ugly given that it's months after the usual cutoff, but the effect hasn't changed (they wouldn't have had any extensions) so it's probably ok.  Needs a notice in APIchanges, though.
>

Done, with a minor lavu bump and an APIchanges notice. Looks tidier with the fields at the bottom anyway.

Patch attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-hwcontext_vulkan-expose-enabled-device-and-instance-.patch
Type: text/x-patch
Size: 7107 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200510/2fdbfe34/attachment.bin>


More information about the ffmpeg-devel mailing list