-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2200 from billhollings/VK_EXT_metal_objects-ARC
Fix crash when using VK_EXT_metal_objects under ARC.
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
Templates/Vulkan-Headers/VK_EXT_metal_objects-unret.gitdiff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
diff --git a/include/vulkan/vulkan_metal.h b/include/vulkan/vulkan_metal.h | ||
index e6f7bf7..c6bccf5 100644 | ||
--- a/include/vulkan/vulkan_metal.h | ||
+++ b/include/vulkan/vulkan_metal.h | ||
@@ -52,28 +52,28 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT( | ||
#define VK_EXT_metal_objects 1 | ||
#ifdef __OBJC__ | ||
@protocol MTLDevice; | ||
-typedef id<MTLDevice> MTLDevice_id; | ||
+typedef __unsafe_unretained id<MTLDevice> MTLDevice_id; | ||
#else | ||
typedef void* MTLDevice_id; | ||
#endif | ||
|
||
#ifdef __OBJC__ | ||
@protocol MTLCommandQueue; | ||
-typedef id<MTLCommandQueue> MTLCommandQueue_id; | ||
+typedef __unsafe_unretained id<MTLCommandQueue> MTLCommandQueue_id; | ||
#else | ||
typedef void* MTLCommandQueue_id; | ||
#endif | ||
|
||
#ifdef __OBJC__ | ||
@protocol MTLBuffer; | ||
-typedef id<MTLBuffer> MTLBuffer_id; | ||
+typedef __unsafe_unretained id<MTLBuffer> MTLBuffer_id; | ||
#else | ||
typedef void* MTLBuffer_id; | ||
#endif | ||
|
||
#ifdef __OBJC__ | ||
@protocol MTLTexture; | ||
-typedef id<MTLTexture> MTLTexture_id; | ||
+typedef __unsafe_unretained id<MTLTexture> MTLTexture_id; | ||
#else | ||
typedef void* MTLTexture_id; | ||
#endif | ||
@@ -81,7 +81,7 @@ typedef void* MTLTexture_id; | ||
typedef struct __IOSurface* IOSurfaceRef; | ||
#ifdef __OBJC__ | ||
@protocol MTLSharedEvent; | ||
-typedef id<MTLSharedEvent> MTLSharedEvent_id; | ||
+typedef __unsafe_unretained id<MTLSharedEvent> MTLSharedEvent_id; | ||
#else | ||
typedef void* MTLSharedEvent_id; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters