[FFmpeg-devel] [PATCH 2/2] hwcontext_vulkan: expose the enabled device features

Lynne dev at lynne.ee
Thu May 14 02:47:29 EEST 2020


May 13, 2020, 17:45 by ffmpeg at haasn.xyz:

> Hi, I guess you already know this but just as a reminder:
>
> On Wed, 13 May 2020 17:53:33 +0200 (CEST), Lynne <dev at lynne.ee> wrote:
>
>> +    vkGetPhysicalDeviceFeatures(hwctx->phys_dev, &dev_features);
>> +#define COPY_FEATURE(DST, NAME) (DST).NAME = dev_features.NAME;
>> +    COPY_FEATURE(hwctx->device_features, shaderImageGatherExtended)
>> +    COPY_FEATURE(hwctx->device_features, shaderStorageImageExtendedFormats)
>> +    COPY_FEATURE(hwctx->device_features, fragmentStoresAndAtomics)
>> +    COPY_FEATURE(hwctx->device_features, vertexPipelineStoresAndAtomics)
>> +    COPY_FEATURE(hwctx->device_features, shaderInt64)
>> +#undef COPY_FEATURE
>>
>
> Enabling shaderStorageImageExtendedFormats makes no sense, because it's
> specified that enabling this feature does nothing. It only exists for
> informational purposes.
>
> I realize you copied this code from libplacebo, but libplacebo had the
> same issue and I removed it after verifying that it made no difference.
> It seems to have been a legacy leftover from a bug in the validation
> layers or something.
>

Yes, I forgot about that even though I told you about it :)
Removed.



> Rest LGTM, although note that libplacebo has switched to
> VkPhysicalDeviceFeatures2KHR in the meantime, to avoid API breaks if I
> decide to use extension features in the future. It's not a huge deal
> since that struct is almost identical to VkPhysicalDeviceFeatures and
> therefore it's trivially interoperable with you code whether you decide
> to use it as well or not.
>

Switched over here as well.

New patch attached.
The API bump and APIchanges for the 2 commits will happen in a 3rd commit,
which I'll make as I'm pushing these patches.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-hwcontext_vulkan-expose-the-enabled-device-features.patch
Type: text/x-patch
Size: 3053 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200514/b0c07d6d/attachment.bin>


More information about the ffmpeg-devel mailing list