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

Niklas Haas ffmpeg at haasn.xyz
Wed May 13 19:45:35 EEST 2020


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.

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.


More information about the ffmpeg-devel mailing list