From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] hwcontext_vulkan: check if expect_assume is supported by the headers
Date: Tue, 15 Apr 2025 16:35:33 -0300
Message-ID: <5b446185-cff0-4c87-ba17-e24edb28f45d@gmail.com> (raw)
In-Reply-To: <20250415193145.9479-1-dev@lynne.ee>
[-- Attachment #1.1.1: Type: text/plain, Size: 3594 bytes --]
On 4/15/2025 4:31 PM, Lynne wrote:
> ---
> libavutil/hwcontext_vulkan.c | 8 ++++++++
> libavutil/vulkan_loader.h | 2 ++
> 2 files changed, 10 insertions(+)
>
> diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
> index 8823af0175..f878dfec76 100644
> --- a/libavutil/hwcontext_vulkan.c
> +++ b/libavutil/hwcontext_vulkan.c
> @@ -79,7 +79,9 @@ typedef struct VulkanDeviceFeatures {
> VkPhysicalDeviceVulkan12Features vulkan_1_2;
> VkPhysicalDeviceVulkan13Features vulkan_1_3;
> VkPhysicalDeviceTimelineSemaphoreFeatures timeline_semaphore;
> +#ifdef VK_KHR_expect_assume
Are you sure it's not VK_KHR_shader_expect_assume as mentioned in
https://registry.khronos.org/vulkan/specs/latest/man/html/VkPhysicalDeviceShaderExpectAssumeFeatures.html
?
> VkPhysicalDeviceShaderExpectAssumeFeatures expect_assume;
> +#endif
>
> VkPhysicalDeviceVideoMaintenance1FeaturesKHR video_maintenance_1;
> #ifdef VK_KHR_video_maintenance2
> @@ -211,8 +213,10 @@ static void device_features_init(AVHWDeviceContext *ctx, VulkanDeviceFeatures *f
> OPT_CHAIN(&feats->timeline_semaphore, FF_VK_EXT_PORTABILITY_SUBSET,
> VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES);
>
> +#ifdef VK_KHR_expect_assume
> OPT_CHAIN(&feats->expect_assume, FF_VK_EXT_EXPECT_ASSUME,
> VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES_KHR);
> +#endif
>
> OPT_CHAIN(&feats->video_maintenance_1, FF_VK_EXT_VIDEO_MAINTENANCE_1,
> VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR);
> @@ -306,7 +310,9 @@ static void device_features_copy_needed(VulkanDeviceFeatures *dst, VulkanDeviceF
> COPY_VAL(relaxed_extended_instruction.shaderRelaxedExtendedInstruction);
> #endif
>
> +#ifdef VK_KHR_expect_assume
> COPY_VAL(expect_assume.shaderExpectAssume);
> +#endif
>
> COPY_VAL(optical_flow.opticalFlow);
> #undef COPY_VAL
> @@ -622,7 +628,9 @@ static const VulkanOptExtension optional_device_exts[] = {
> { VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME, FF_VK_EXT_COOP_MATRIX },
> { VK_NV_OPTICAL_FLOW_EXTENSION_NAME, FF_VK_EXT_OPTICAL_FLOW },
> { VK_EXT_SHADER_OBJECT_EXTENSION_NAME, FF_VK_EXT_SHADER_OBJECT },
> +#ifdef VK_KHR_expect_assume
> { VK_KHR_SHADER_EXPECT_ASSUME_EXTENSION_NAME, FF_VK_EXT_EXPECT_ASSUME },
> +#endif
> { VK_KHR_VIDEO_MAINTENANCE_1_EXTENSION_NAME, FF_VK_EXT_VIDEO_MAINTENANCE_1 },
> #ifdef VK_KHR_video_maintenance2
> { VK_KHR_VIDEO_MAINTENANCE_2_EXTENSION_NAME, FF_VK_EXT_VIDEO_MAINTENANCE_2 },
> diff --git a/libavutil/vulkan_loader.h b/libavutil/vulkan_loader.h
> index 3641fcb22e..46172403ba 100644
> --- a/libavutil/vulkan_loader.h
> +++ b/libavutil/vulkan_loader.h
> @@ -76,7 +76,9 @@ static inline uint64_t ff_vk_extensions_to_mask(const char * const *extensions,
> { VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_H265 },
> { VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_AV1 },
> { VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME, FF_VK_EXT_PUSH_DESCRIPTOR },
> +#ifdef VK_KHR_expect_assume
> { VK_KHR_SHADER_EXPECT_ASSUME_EXTENSION_NAME, FF_VK_EXT_EXPECT_ASSUME },
> +#endif
> };
>
> FFVulkanExtensions mask = 0x0;
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2025-04-15 19:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 19:31 Lynne
2025-04-15 19:35 ` James Almer [this message]
2025-04-15 19:40 ` Tristan Matthews
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5b446185-cff0-4c87-ba17-e24edb28f45d@gmail.com \
--to=jamrial@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git