From: "Martin Storsjö" <martin@martin.st>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: "Kacper Michajłow" <kasper93@gmail.com>
Subject: Re: [FFmpeg-devel] [PATCH] lavu/vulkan: fix handle type for 32-bit targets
Date: Mon, 6 Mar 2023 11:00:33 +0200 (EET)
Message-ID: <5f4d2cc8-b8b8-7a86-5eec-5eb2f05fd8e6@martin.st> (raw)
In-Reply-To: <20230302162730.1281-1-kasper93@gmail.com>
On Thu, 2 Mar 2023, Kacper Michajłow wrote:
> Fixes compilation with clang which errors out on Wint-conversion.
>
> Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
> ---
> libavutil/hwcontext_vulkan.c | 2 +-
> libavutil/vulkan.h | 4 ++++
> 2 files changed, 5 insertions(+), 1 deletion(-)
Minor context; it's only recent Clang that treats this issue as an error
by default - iirc it changed sometime last year, so possibly since Clang
15 or so.
>
> diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
> index 2a9b5f4aac..b3eccea7af 100644
> --- a/libavutil/hwcontext_vulkan.c
> +++ b/libavutil/hwcontext_vulkan.c
> @@ -1149,7 +1149,7 @@ static void free_exec_ctx(AVHWFramesContext *hwfc, VulkanExecCtx *cmd)
>
> av_freep(&cmd->queues);
> av_freep(&cmd->bufs);
> - cmd->pool = NULL;
> + cmd->pool = VK_NULL_HANDLE;
> }
This LGTM - I had run into the same issue and tried to fix this issue
differently, but this looks better to me.
> static VkCommandBuffer get_buf_exec_ctx(AVHWFramesContext *hwfc, VulkanExecCtx *cmd)
> diff --git a/libavutil/vulkan.h b/libavutil/vulkan.h
> index d1ea1e24fb..90922c6cf3 100644
> --- a/libavutil/vulkan.h
> +++ b/libavutil/vulkan.h
> @@ -122,7 +122,11 @@ typedef struct FFVulkanPipeline {
> VkDescriptorSetLayout *desc_layout;
> VkDescriptorPool desc_pool;
> VkDescriptorSet *desc_set;
> +#if VK_USE_64_BIT_PTR_DEFINES == 1
> void **desc_staging;
> +#else
> + uint64_t *desc_staging;
> +#endif
> VkDescriptorSetLayoutBinding **desc_binding;
> VkDescriptorUpdateTemplate *desc_template;
> int *desc_set_initialized;
> --
> 2.34.1
What issue does this fix? I don't run into any errors relating to this,
when building with Clang for Windows on i386 or armv7. I think the fix is
correct though, the vulkan data types are a bit hard to get a grip of.
// Martin
_______________________________________________
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:[~2023-03-06 9:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-02 16:27 Kacper Michajłow
2023-03-06 9:00 ` Martin Storsjö [this message]
2023-03-07 14:39 ` Kacper Michajlow
2023-03-07 20:53 ` Martin Storsjö
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=5f4d2cc8-b8b8-7a86-5eec-5eb2f05fd8e6@martin.st \
--to=martin@martin.st \
--cc=ffmpeg-devel@ffmpeg.org \
--cc=kasper93@gmail.com \
/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