From 0b9ec1b657f4f30ef918e0fb1db5303eda37c279 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Mon, 1 Jul 2024 16:59:23 +0530 Subject: [PATCH] applemedia: Disable some deprecation errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This needs significant work to use the new Metal→Vulkan integration extension `VK_EXT_metal_objects` ``` MoltenVK/mvk_deprecated_api.h:132:1: note: 'vkGetMTLDeviceMVK' has been explicitly marked deprecated here MVK_DEPRECATED_USE_MTL_OBJS ^ MoltenVK/mvk_deprecated_api.h:74:52: note: expanded from macro 'MVK_DEPRECATED_USE_MTL_OBJS' #define MVK_DEPRECATED_USE_MTL_OBJS VKAPI_ATTR [[deprecated("Use the VK_EXT_metal_objects extension instead.")]] ^ ../sys/applemedia/videotexturecache-vulkan.mm:303:20: error: 'vkSetMTLTextureMVK' is deprecated: Use the VK_EXT_metal_objects extension instead. VkResult err = vkSetMTLTextureMVK (memory->vulkan_mem.image, texture); ^ MoltenVK/mvk_deprecated_api.h:151:1: note: 'vkSetMTLTextureMVK' has been explicitly marked deprecated here MVK_DEPRECATED_USE_MTL_OBJS ^ MoltenVK/mvk_deprecated_api.h:74:52: note: expanded from macro 'MVK_DEPRECATED_USE_MTL_OBJS' #define MVK_DEPRECATED_USE_MTL_OBJS VKAPI_ATTR [[deprecated("Use the VK_EXT_metal_objects extension instead.")]] ^ 2 errors generated. ``` Part-of: --- .../sys/applemedia/videotexturecache-vulkan.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-vulkan.mm b/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-vulkan.mm index 017612a111..a889bf0a4e 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-vulkan.mm +++ b/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-vulkan.mm @@ -288,7 +288,9 @@ gst_io_surface_vulkan_memory_set_surface (GstIOSurfaceVulkanMemory * memory, IOSurfaceIncrementUseCount (surface); gpu = gst_vulkan_device_get_physical_device (vk_mem->device); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; vkGetMTLDeviceMVK (gpu, &mtl_dev); + G_GNUC_END_IGNORE_DEPRECATIONS; /* We cannot use vkUseIOSurfaceMVK() for multi-planer as MoltenVK does not * support them. */ @@ -300,7 +302,9 @@ gst_io_surface_vulkan_memory_set_surface (GstIOSurfaceVulkanMemory * memory, texture_data->pixbuf = (CVPixelBufferRef) vk_mem->user_data; texture_data->texture = (__bridge_retained gpointer) texture; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; VkResult err = vkSetMTLTextureMVK (memory->vulkan_mem.image, texture); + G_GNUC_END_IGNORE_DEPRECATIONS; GST_DEBUG ("bound texture %p to image %" GST_VULKAN_NON_DISPATCHABLE_HANDLE_FORMAT ": 0x%x", texture, memory->vulkan_mem.image, err);