1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

avutil/hwcontext_vulkan: always enable baseline usage flags

The documentation states that this field is for enabling "extra" usage
flags. This conflicts with the implementation, and the rest of the comment,
though.

In resolving this ambiguity, I think it's better to lean towards the first
sentence and treat this field purely as specifying *extra* usage flags to
enable. Otherwise, this may break vulkan encoding or subsequent hwdownload
if the upstream filter did not specifically advertise this.

Change the default behavior and update the documentation slightly to more
clearly document the semantics.
This commit is contained in:
Niklas Haas
2025-08-20 16:56:22 +02:00
committed by Lynne
parent b1f2eea1cd
commit a45d30a675
2 changed files with 13 additions and 14 deletions

View File

@@ -218,7 +218,8 @@ typedef struct AVVulkanFramesContext {
/**
* Defines extra usage of output frames. If non-zero, all flags MUST be
* supported by the VkFormat. Otherwise, will use supported flags amongst:
* supported by the VkFormat. Regardless, frames will always have the
* following usage flags enabled, if supported by the format:
* - VK_IMAGE_USAGE_SAMPLED_BIT
* - VK_IMAGE_USAGE_STORAGE_BIT
* - VK_IMAGE_USAGE_TRANSFER_SRC_BIT