applemedia: Disable some deprecation errors

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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
This commit is contained in:
Nirbheek Chauhan 2024-07-01 16:59:23 +05:30
parent 8619e163bf
commit 0b9ec1b657

View file

@ -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);