Fix Blender crash on startup on macOS
The issue was caused by recent C++ transition: the header file is shared between CPU and GPU. The Metal defines __cplusplus so it is not enough to check for it to use C linking as it is not a valid syntax for shaders. Pull Request: https://projects.blender.org/blender/blender/pulls/110570
This commit is contained in:
committed by
Sergey Sharybin
parent
44c54eda6f
commit
f839c31f6c
@@ -47,7 +47,7 @@ typedef enum eObjectInfoFlag eObjectInfoFlag;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(GPU_SHADER)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -385,6 +385,6 @@ BLI_STATIC_ASSERT_ALIGN(DRWDebugPrintBuffer, 16)
|
||||
|
||||
/** \} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(GPU_SHADER)
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user