Skip to content

Commit e7c39ef

Browse files
authored
Merge pull request #97309 from kroketio/metal-expose-device-handle
Metal: expose MTLDevice
2 parents db66bd3 + e9c85be commit e7c39ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/metal/rendering_device_driver_metal.mm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3671,7 +3671,8 @@ bool isArrayTexture(MTLTextureType p_type) {
36713671
uint64_t RenderingDeviceDriverMetal::get_resource_native_handle(DriverResource p_type, ID p_driver_id) {
36723672
switch (p_type) {
36733673
case DRIVER_RESOURCE_LOGICAL_DEVICE: {
3674-
return 0;
3674+
uintptr_t devicePtr = (uintptr_t)(__bridge void *)device;
3675+
return (uint64_t)devicePtr;
36753676
}
36763677
case DRIVER_RESOURCE_PHYSICAL_DEVICE: {
36773678
return 0;

0 commit comments

Comments
 (0)