Skip to content

Commit cbc195f

Browse files
committed
make spir-v intrinsics work in C++ mode
1 parent 757ae29 commit cbc195f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

vcc/include/shady.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#endif
77

88
#if defined(__cplusplus) & !defined(SHADY_CPP_NO_NAMESPACE)
9+
extern "C" {
910
namespace vcc {
1011
#endif
1112

@@ -82,6 +83,9 @@ native_uvec3 gl_LaunchIDEXT;
8283

8384
#if defined(__cplusplus) & !defined(SHADY_CPP_NO_NAMESPACE)
8485
}
86+
}
8587
#endif
8688

89+
#include "shady_sample.h"
90+
8791
#endif

vcc/include/shady_sample.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "shady_meta.h"
66

77
#if defined(__cplusplus) & !defined(SHADY_CPP_NO_NAMESPACE)
8+
extern "C" {
89
namespace vcc {
910
#endif
1011

@@ -43,6 +44,7 @@ static inline native_vec4 texture(const samplerCube img, native_vec3 coords) { r
4344

4445
#if defined(__cplusplus) & !defined(SHADY_CPP_NO_NAMESPACE)
4546
}
47+
}
4648
#endif
4749

4850
#endif

0 commit comments

Comments
 (0)