From e9c85be76fe6faedfd5c8a1dab48cb2c9503116f Mon Sep 17 00:00:00 2001 From: Sander Date: Sun, 22 Sep 2024 03:19:06 +0300 Subject: [PATCH] Metal: expose DRIVER_RESOURCE_LOGICAL_DEVICE for get_resource_native_handle() --- drivers/metal/rendering_device_driver_metal.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/metal/rendering_device_driver_metal.mm b/drivers/metal/rendering_device_driver_metal.mm index 9d691a0d2307..8bab31b5a530 100644 --- a/drivers/metal/rendering_device_driver_metal.mm +++ b/drivers/metal/rendering_device_driver_metal.mm @@ -3667,7 +3667,8 @@ bool isArrayTexture(MTLTextureType p_type) { uint64_t RenderingDeviceDriverMetal::get_resource_native_handle(DriverResource p_type, ID p_driver_id) { switch (p_type) { case DRIVER_RESOURCE_LOGICAL_DEVICE: { - return 0; + uintptr_t devicePtr = (uintptr_t)(__bridge void *)device; + return (uint64_t)devicePtr; } case DRIVER_RESOURCE_PHYSICAL_DEVICE: { return 0;