aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2023-03-05 23:36:53 +0200
committerMartin Storsjö <martin@martin.st>2023-03-09 13:56:12 +0200
commitb7df1d29134dc1d8399a2f229d2b44f9288de6a4 (patch)
tree13ae2cb9d74799f9a12af4d92a4bb621c3089c1e
parent2953c6381afc3d52f3c97692228a5120fad4e0dd (diff)
downloadffmpeg-b7df1d29134dc1d8399a2f229d2b44f9288de6a4.tar.gz
vulkan: Fix win/i386 calling convention
This fixes the following error when compiling with a modern version of Clang for Windows/i386: src/libavutil/hwcontext_vulkan.c:738:32: error: incompatible function pointer types initializing 'PFN_vkDebugUtilsMessengerCallbackEXT' (aka 'unsigned int (*)(enum VkDebugUtilsMessageSeverityFlagBitsEXT, unsigned int, const struct VkDebugUtilsMessengerCallbackDataEXT *, void *) __attribute__((stdcall))') with an expression of type 'VkBool32 (VkDebugUtilsMessageSeverityFlagBitsEXT, VkDebugUtilsMessageTypeFlagsEXT, const VkDebugUtilsMessengerCallbackDataEXT *, void *)' (aka 'unsigned int (enum VkDebugUtilsMessageSeverityFlagBitsEXT, unsigned int, const struct VkDebugUtilsMessengerCallbackDataEXT *, void *)') [-Wincompatible-function-pointer-types] .pfnUserCallback = vk_dbg_callback, ^~~~~~~~~~~~~~~ Signed-off-by: Martin Storsjö <martin@martin.st> (cherry picked from commit f9620d74cd49c35223304ba41e28be6144e45783) Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavutil/hwcontext_vulkan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 3bc0dc8a40..5981016cf4 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -397,10 +397,10 @@ static const char *vk_ret2str(VkResult res)
#undef CASE
}
-static VkBool32 vk_dbg_callback(VkDebugUtilsMessageSeverityFlagBitsEXT severity,
- VkDebugUtilsMessageTypeFlagsEXT messageType,
- const VkDebugUtilsMessengerCallbackDataEXT *data,
- void *priv)
+static VkBool32 VKAPI_CALL vk_dbg_callback(VkDebugUtilsMessageSeverityFlagBitsEXT severity,
+ VkDebugUtilsMessageTypeFlagsEXT messageType,
+ const VkDebugUtilsMessengerCallbackDataEXT *data,
+ void *priv)
{
int l;
AVHWDeviceContext *ctx = priv;