@@ -46,7 +46,7 @@ extern "C" const rdcstr VulkanLayerJSONBasename;
4646#undef VK_LAYER_EXPORT
4747#define VK_LAYER_EXPORT extern " C" __declspec(dllexport)
4848
49- #elif ENABLED(RDOC_LINUX) || ENABLED(RDOC_ANDROID)
49+ #elif ENABLED(RDOC_LINUX) || ENABLED(RDOC_ANDROID) || ENABLED(RDOC_APPLE)
5050
5151#undef VK_LAYER_EXPORT
5252#define VK_LAYER_EXPORT __attribute__ ((visibility(" default" )))
@@ -392,26 +392,26 @@ VK_LAYER_RENDERDOC_CaptureEnumerateInstanceExtensionProperties(
392392#define CheckExt (name, ver ) name = instDevInfo == NULL || instDevInfo->ext_##name;
393393
394394#undef HookInit
395- #define HookInit (function ) \
395+ #define HookInit (function ) \
396396 if (!strcmp(pName, STRINGIZE(CONCAT(vk, function)))) \
397- return (PFN_vkVoidFunction)& CONCAT (hooked_vk, function);
397+ return (PFN_vkVoidFunction) & CONCAT (hooked_vk, function);
398398
399399#undef HookInitExtension
400- #define HookInitExtension (cond, function ) \
401- if (!strcmp(pName, STRINGIZE(CONCAT(vk, function)))) \
402- { \
403- if (cond) \
404- return (PFN_vkVoidFunction)& CONCAT (hooked_vk, function); \
400+ #define HookInitExtension (cond, function ) \
401+ if (!strcmp(pName, STRINGIZE(CONCAT(vk, function)))) \
402+ { \
403+ if (cond) \
404+ return (PFN_vkVoidFunction) & CONCAT (hooked_vk, function); \
405405 }
406406
407407// for promoted extensions, we return the function pointer for either name as an alias.
408408#undef HookInitPromotedExtension
409- #define HookInitPromotedExtension (cond, function, suffix ) \
410- if (!strcmp(pName, STRINGIZE(CONCAT(vk, function))) || \
409+ #define HookInitPromotedExtension (cond, function, suffix ) \
410+ if (!strcmp(pName, STRINGIZE(CONCAT(vk, function))) || \
411411 !strcmp(pName, STRINGIZE(CONCAT(vk, CONCAT(function, suffix))))) \
412- { \
413- if (cond) \
414- return (PFN_vkVoidFunction)& CONCAT (hooked_vk, function); \
412+ { \
413+ if (cond) \
414+ return (PFN_vkVoidFunction) & CONCAT (hooked_vk, function); \
415415 }
416416
417417#undef HookInitExtensionEXTtoKHR
@@ -516,15 +516,15 @@ VK_LAYER_RENDERDOC_CaptureGetInstanceProcAddr(VkInstance instance, const char *p
516516 // GetInstanceProcAddr must also unconditionally return all device functions
517517
518518#undef HookInitExtension
519- #define HookInitExtension (cond, function ) \
519+ #define HookInitExtension (cond, function ) \
520520 if (!strcmp (pName, STRINGIZE (CONCAT (vk, function)))) \
521- return (PFN_vkVoidFunction)& CONCAT (hooked_vk, function);
521+ return (PFN_vkVoidFunction) & CONCAT (hooked_vk, function);
522522
523523#undef HookInitPromotedExtension
524- #define HookInitPromotedExtension (cond, function, suffix ) \
525- if (!strcmp (pName, STRINGIZE (CONCAT (vk, function))) || \
524+ #define HookInitPromotedExtension (cond, function, suffix ) \
525+ if (!strcmp (pName, STRINGIZE (CONCAT (vk, function))) || \
526526 !strcmp (pName, STRINGIZE (CONCAT (vk, CONCAT (function, suffix))))) \
527- return (PFN_vkVoidFunction)& CONCAT (hooked_vk, function);
527+ return (PFN_vkVoidFunction) & CONCAT (hooked_vk, function);
528528
529529#undef HookInitExtensionEXTtoKHR
530530#define HookInitExtensionEXTtoKHR (func ) (void )0 ;
@@ -567,7 +567,7 @@ VK_LAYER_RENDERDOC_Capture_layerGetPhysicalDeviceProcAddr(VkInstance instance, c
567567
568568// any remaining functions that are known, we must return NULL for
569569#undef HookInit
570- #define HookInit (function ) \
570+ #define HookInit (function ) \
571571 if (!strcmp (pName, STRINGIZE (CONCAT (vk, function)))) \
572572 return NULL ;
573573
@@ -597,13 +597,13 @@ VK_LAYER_RENDERDOC_Capture_layerGetPhysicalDeviceProcAddr(VkInstance instance, c
597597
598598// any remaining functions that are known, we must return NULL for
599599#undef HookInitExtension
600- #define HookInitExtension (cond, function ) \
600+ #define HookInitExtension (cond, function ) \
601601 if (!strcmp (pName, STRINGIZE (CONCAT (vk, function)))) \
602602 return NULL ;
603603
604604#undef HookInitPromotedExtension
605- #define HookInitPromotedExtension (cond, function, suffix ) \
606- if (!strcmp (pName, STRINGIZE (CONCAT (vk, function))) || \
605+ #define HookInitPromotedExtension (cond, function, suffix ) \
606+ if (!strcmp (pName, STRINGIZE (CONCAT (vk, function))) || \
607607 !strcmp (pName, STRINGIZE (CONCAT (vk, CONCAT (function, suffix))))) \
608608 return NULL ;
609609
0 commit comments